RANK

A window function that gives tied rows the same position and then skips positions, as in 1, 2, 2, 4.

In more detail

It is how a sports table ranks: two joint seconds mean there is no third. Use DENSE_RANK when you want no gaps.

Example

RANK() OVER (ORDER BY price_cents DESC) AS price_rank

Related terms

Taught in

References