Description
RANK assigns a rank (an integer) to each
row, starting with one. These ranks are determined by the values specified
in the ORDER BY expression; for example, any rows that have the same
value are given the same rank. However, unlike DENSE_RANK(), RANK() skips sequential numbers if two or more rows share the same rank — if two rows both have a rank of one, the next rank that will be assigned is three.
The ranks can include duplicate values
if multiple rows contain the same value for the window function field.