0176.sql (175B)
1 SELECT CASE 2 WHEN COUNT(salary)=1 THEN NULL 3 ELSE (SELECT DISTINCT salary FROM Employee ORDER BY salary DESC LIMIT 1 OFFSET 1) 4 END AS secondHighestSalary 5 FROM Employee