SQL Practice Logo

SQLPractice Online

Scenario SQL Question

Second Highest Salary

Build mastery in Subqueries with this scenario-based SQL challenge and live execution support.

Problem Statement

Return the employee(s) earning the second-highest distinct salary. Use nested MAX subqueries (`MAX(salary) WHERE salary < MAX(salary)`). Return employee_id, first_name, last_name, salary — ordered by employee_id.

Relevant Tables

employees

SQL Concepts Used in This Scenario

Strengthen your understanding with these targeted learning topics: