CUME_DIST returns the relative position of a row within a group meeting certain criteria.

You can specify one or more expressions to pass as arguments to the function.

Syntax:

CUME_DIST(expression1,… WITHIN GROUP (ORDER BY)

Example:

SELECT CUME_DIST(5000,103) WITHIN GROUP (ORDER BY SALARY, MGR_ID) as RESULT FROM EMP;

RESULT
————
.462962963

Cume_dist – Oracle SQL Function
Tagged on: