MSSQLWindow FunctionsCUME_DIST
PERCENT_RANK

CUME_DISTWindow Functions

NTILE

Returns the cumulative distribution value.

Syntax

CUME_DIST() OVER (w)

Example

Enter values below to update the example in real time.

employee_id
salary
cume
employees
SELECT employee_id, salary,
       ROUND(CUME_DIST() OVER (ORDER BY salary), 4) AS cume
FROM employees;