Second Highest Salary Per Department
Hard
subqueries
Google
Meta
LinkedIn
For each department, find the second-highest salary. Return department and second_highest_salary, ordered by department. If a department has fewer than 2 distinct salaries, exclude it.
Expected Output: Department and second-highest salary.
Tables
Hints (3 available)
SQL Editor
Output
Click "Run" to see results...