todoy the correct answer is ......


  • 0
    Z

    SELECT MAX(Salary) as SecondHighestSalary
    FROM (SELECT E1.Salary
    FROM Employee as E1 JOIN Employee as E2
    ON E1.Salary < E2.Salary
    GROUP BY E1.Id HAVING COUNT(E2.Id) = 1
    ) AS SecondHighestSalary
    ORDER BY Salary DESC LIMIT 1;


Log in to reply
 

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