Scenario SQL Question
Find Salary Percentile Rank for Each Employee
Build mastery in Ranking Nth Value with this scenario-based SQL challenge and live execution support.
Problem Statement
Compute each employee's salary percentile rank on the conventional 0-100 scale: 100 ≈ highest earner, 0 = lowest. PERCENT_RANK gives a fraction in [0, 1]; multiply by 100 and ROUND to 2 decimals. Show first_name, last_name, salary, percentile_rank, ordered by salary DESC, employee_id.
Relevant Tables
employees
SQL Concepts Used in This Scenario
Strengthen your understanding with these targeted learning topics: