CUME_DIST

functionsupportedCore SQL functions

docs.snowflake.com ↗

Window functions

Finds the cumulative distribution of a value with regard to other values within the same window partition.

Syntax

supportedpartialnot supportednot scored

CUME_DIST() OVER ( [ PARTITION BY <partition_expr> ]
  ORDER BY <order_expr> [ { ASC | DESC } ] [ NULLS { FIRST | LAST } ] )

Parameters

NameRequiredDescription
partition_exprrequiredThis is the optional expression to use to group rows into partitions.
order_exprrequiredThis expression specifies the order of the rows within each partition.

Returns

The data type of the returned value is DOUBLE.

Usage notes