Scenario SQL Question
Salary Ranking with Subqueries
Build mastery in Subqueries with this scenario-based SQL challenge and live execution support.
Problem Statement
For each employee compute their salary rank (1 = highest) by counting how many distinct higher salaries exist. Ties share a rank. Return employee_id, first_name, last_name, salary, salary_rank — ordered by salary_rank, employee_id.
Relevant Tables
employees
SQL Concepts Used in This Scenario
Strengthen your understanding with these targeted learning topics: