English | 简体中文

api-docs / org.ktorm.dsl / rank

rank

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

Return the rank of the current row within its partition, with gaps. Peers are considered ties and receive the same
rank. This function does not assign consecutive ranks to peer groups if groups of size greater than one exist;
the result is 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