Second highest salary using subquery
SQL
Medium
3 views
Problem Description
Return the second highest distinct salary from Employees.
Constraints
Use subquery with DISTINCT
Official Solution
SELECT MAX(salary) AS second_highest FROM Employees WHERE salary < (SELECT MAX(salary) FROM Employees);
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!