(0, 1].
For more information on usage, please refer to Window Functions.
Syntax
Parameters
Return Type
DOUBLE PRECISION
Remarks
CUME_DISTtakes no arguments.- When no
ORDER BYclause is specified, all rows within the partition are considered peers andCUME_DISTreturns1for every row. - Unlike
PERCENT_RANK, the minimum value ofCUME_DISTis1/N(not0), where N is the partition size. - This function respects
NULLvalues, and results will be ordered with default null orderingNULLS LASTunless otherwise specified in theORDER BYclause.
Example
The following example ranks each level bymaxpoints within its leveltype, showing what fraction of levels in the same type have a maxpoints value less than or equal to the current row:
Rows: 10Execution time: 8.19ms