English | 简体中文

api-docs / org.ktorm.dsl / denseRank

denseRank

The dense_rank window function, translated to dense_rank() in SQL.

Return the rank of the current row within its partition, without gaps. Peers are considered ties and receive
the same rank. This function assigns consecutive ranks to peer groups; the result is that groups of size
greater than one do not produce non-contiguous rank numbers.

This function should be used with ORDER BY to sort partition rows into the desired order. Without ORDER BY,
all rows are peers.

Since
3.6.0