leetcode

Solution to some Leetcode problems written in C++
git clone git://git.dimitrijedobrota.com/leetcode.git
Log | Files | Refs | README | LICENSE

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