CUME_DIST() OVER ...
All functions > WINDOW FUNCTION > CUME_DIST() OVER ...
Returns the cumulative distribution: (number of rows <= current row) / (total rows).
Syntax
Diagram(
Sequence(
Terminal("CUME_DIST"),
Terminal("("),Terminal(")"),
Terminal("OVER"),
Terminal("("),
NonTerminal("over_clause"),
Terminal(")"),
)
)| Parameter | Type | Required | Description |
|---|---|---|---|
over_clause | OVER CLAUSE | Yes | OVER (PARTITION BY ... ORDER BY ... [FRAME ...]) |
Notes
- Returns a value between 0 (exclusive) and 1 (inclusive)
- Requires ORDER BY clause to determine row ordering
- PARTITION BY creates independent distribution groups