- Published on
Leetcode - 176. Second Highest Salary
- Authors
- Name
- Indo Yoon
Table of Contents
문제
[Loading...
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
LeetCode
](https://leetcode.com/problems/second-highest-salary/)
정답
SELECT () AS ~
를 쓰면 NULL값을 보존할 수 있다.
SELECT (
SELECT salary
FROM employee
GROUP BY salary
ORDER BY salary DESC
LIMIT 1
OFFSET 1) AS SecondHighestSalary