반응형
```
SELECT
(SELECT DISTINCT
Salary
FROM
Employee
ORDER BY Salary DESC
LIMIT 1 OFFSET 1) AS SecondHighestSalary
;
```
배워야할점. OFFSET, LIMIT1으로 제한하기.
SELECT 두번쓰면서 null값 알아내기.
DISTINCT로 복수없애기.
반응형