My answer worked on my computer,but failed in leetcode.Why cannnot work?


  • 0
    M

    select a.salary from Employee a
    WHERE a.salary <(select MAX(b.salary) from Employee b)
    ORDER BY a.salary DESC
    limit 1


  • 0
    D

    My solution: SELECT max(salary)
    FROM Employee
    WHERE salary < (SELECT max(salary) FROM Employee);

    also worked on my machine, but failed in leetcode?


Log in to reply
 

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