quantile

Returns the rank of a value for the specified range. It returns integers to represent any range of ranks, such as 1 (highest) to 100 (lowest).

Syntax

quantile ( numeric_expression , numeric_expression [ tuple 
member_expression { , member_expression } ] within set 
set_expression )