Files
leetcode/176-second-highest-salary/176-second-highest-salary.sql
T

8 lines
190 B
SQL

# Write your MySQL query statement below
SELECT
IFNULL(
(SELECT DISTINCT salary
FROM Employee
ORDER BY salary DESC
LIMIT 1 OFFSET 1),
NULL) as SecondHighestSalary