Numbering

Cumulative distribution

Return the relative rank of a row defined as NP/NR. NP is defined to be the number of rows that either precede or are peers with the current row. NR is the number of rows in the partition. –> learn more

CUME_DIST()

Return type

float

Parameters

Dense rank

Returns the ordinal (1-based) rank of each row within the ordered partition. All peer rows receive the same rank value, and the subsequent rank value is incremented by one. –> learn more

DENSE_RANK()

Return type

integer

Parameters

N-tile

Divides the rows into a set number of buckets based on row ordering and returns the 1-based bucket number that is assigned to each row. –> learn more

NTILE(@literal)

Return type

integer

Parameters

NameTypeAllowed valuesRequiredPlaceholder (in UI)

@literal

true

(integer)

Percent rank

Return the percentile rank of a row defined as (RK-1)/(NR-1), where RK is the RANK of the row and NR is the number of rows in the partition. –> learn more

PERCENT_RANK()

Return type

float

Parameters

Rank

Returns the ordinal (1-based) rank of each row within the ordered partition. All peer rows receive the same rank value. The next row or set of peer rows receives a rank value which increments by the number of peers with the previous rank value –> learn more

RANK()

Return type

integer

Parameters

Row number

Returns the sequential row ordinal (1-based) of each row for each ordered partition. If the no order condition is specified then the result is non-deterministic. –> learn more

ROW_NUMBER()

Return type

integer

Parameters

Last updated