Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Cumulative Distribution of Salaries

Return each employee's name, salary and the percentage of employees earning less than or equal to that salary (cumulative distribution) rounded to two decimals. Order by salary, then name.

Table schema

Employees(id INT PRIMARY KEY, name VARCHAR(50), salary INT)

Sample data

id | name | salary
1 | A | 100
2 | B | 200
3 | C | 200
4 | D | 300

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.