Scenario SQL Question
Salary Distribution Per Department (PERCENT_RANK & CUME_DIST)
Build mastery in Ctes Window with this scenario-based SQL challenge and live execution support.
Problem Statement
For each employee show their PERCENT_RANK and CUME_DIST within their department (ascending salary), both rounded to 4 decimals. Return department_name, first_name, last_name, salary, percent_rank, cume_dist — ordered by department_name, salary, employee_id.
Relevant Tables
employeesdepartments
SQL Concepts Used in This Scenario
Strengthen your understanding with these targeted learning topics: