DENSE_RANK

A window function that gives tied rows the same position without leaving gaps, as in 1, 2, 2, 3.

In more detail

RANK tells you how many rows are ahead of this one, while DENSE_RANK tells you how many different values are ahead. Choose between them deliberately whenever ties are possible.

Related terms

Taught in

References