DENSE_RANK

DENSE_RANK computes the rank of each row returned from a query with respect to the other rows, based on the values in the ORDER BY clause.

Syntax

DENSE_RANK () OVER ( [ PARTITION BY expression [, ...] ]
 ORDER BY expression [ ASC | DESC ] [ NULLS { FIRST | LAST } [, ...] )

Remarks

PARTITION BY is optional.
ORDER BY is required.
The window clause is not allowed.