Oracle Aggregate functions --- percent_rank () and cume_dist () Specify the relative position of the grouping sequence PERCENT_RANK (expr [, expr]...) within group (order by expr [DESC | ASC] [NULLS {FIRST | LAST}] [, expr [DESC | ASC] [NULLS {FIRST | LAST}]...) returns the relative position of the specified data in the specified group sequence. This value is considered part of the sequence regardless of whether the specified value is repeated or not. SQL code select percent_rank (2975) within group (order by scott. emp. sal) from scott. emp www.2cto.com CUME_DIST (expr [, expr]...) within group (ORDER B Y expr [DESC | ASC] [NULLS {FIRST | LAST}] [, expr [DESC | ASC] [NULLS {FIRST | LAST}]...) query the relative position of a specified value in a specified group sequence. The returned value is a small value between 0 and 1. If the specified value is the same as a value in the group sequence, the binary value is treated as a value. SQL code select cume_dist (2975) within group (order by scott. emp. sal) from scott. emp