Топ-100
 
CerebroSQL

DENSE_RANK

База данных: MySQL

68747470733a2f2f7374796c65732e7265646469746d656469612e636f6d2f74355f32716d366b2f7374796c65

Topic

DENSE_RANK() over_clause

Returns 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 noncontiguous rank numbers. For an
example, see the RANK() function description.

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

over_clause is as described in
https://dev.mysql.com/doc/refman/8.0/en/window-functions-usage.html.

URL: https://dev.mysql.com/doc/refman/8.0/en/window-function-descriptions.html

Example