CUME_DIST() over_clause

Returns the cumulative distribution of a value within a group of
values; that is, the percentage of partition values less than or equal
to the value in the current row. This represents the number of rows
preceding or peer with the current row in the window ordering of the
window partition divided by the total number of rows in the window
partition. Return values range from 0 to 1.

This function should be used with ORDER BY to sort partition rows into
the desired order. Without ORDER BY, all rows are peers and have value
N/N = 1, where N is the partition size.

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

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

