Skip to content

Commit ae68b20

Browse files
Second Highest Salary
1 parent d5f98bd commit ae68b20

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Leetcode_176.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ IFNULL((SELECT DISTINCT Salary
6060
LIMIT 1 OFFSET 1),
6161
NULL) AS SecondHighestSalary
6262

63+
-- NOTE: DISTINCT clause in SQL considers unique values as NULL.
6364
SELECT (SELECT DISTINCT Salary
6465
FROM Employee
6566
ORDER BY Salary DESC

0 commit comments

Comments
 (0)