SQL Part 2 Flashcards
(1 cards)
1
Q
find the second highest distinct salary from Employee(ID, Salary). If there is no second highest salary, return NULL
A
SELECT (SELECT DISTINCT salary FROM employee ORDER BY salary DESC LIMIT 1 OFFSET 1) AS SecondHighestSalary