Back to Developer Roadmap

dense_rank

src/data/roadmaps/sql/content/[email protected]

4.0758 B
Original Source

dense_rank

dense_rank is a window function that assigns a rank to each row within a partition of a result set, based on the order of rows. Unlike the rank function, dense_rank assigns consecutive ranks without gaps, even when there are ties in the ordering criteria. This means that if two or more rows have the same value for the ordering column(s), they will receive the same rank, and the next rank assigned will be the next consecutive integer, without skipping any numbers.

Visit the following resources to learn more: