A very simple solution without using MAX in WHERE clause


  • 0
    L
    SELECT MAX(E1.Salary) AS SecondHighestSalary
    FROM Employee E1, Employee E2
    WHERE E1.Salary < E2.Salary
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.