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

  • 0

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

  • 0

    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.