Skip to main content
Skip to main content
Edit this page

percent_rank

returns the relative rank (i.e. percentile) of rows within a window partition.

Syntax

Alias: percentRank (case-sensitive)

The default and required window frame definition is RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING.

For more detail on window function syntax see: Window Functions - Syntax.

Example

Query:

Result: