cume_dist
analytic window function
Applies to: Databricks SQL Databricks Runtime
Returns the position of a value relative to all values in the partition.
Arguments
over_clause: The clause describing the windowing. See: Window functions.
Returns
A DOUBLE.
The OVER clause of the window function must include an ORDER BY clause.
If the order is not unique the duplicates share the same relative later position.
cume_dist() over(order by expr)
is similar, but not identical to rank() over(order by position) / count(*)
since rank ranking window function produces the earliest absolute order.