my-solutions/leetcode/0176-second-highest-salary/main.sql

9 lines
143 B
MySQL
Raw Permalink Normal View History

2023-11-29 12:51:08 +05:00
SELECT (
SELECT salary
FROM Employee
GROUP BY salary
ORDER BY salary DESC
LIMIT 1
OFFSET 1
) AS "SecondHighestSalary";