I run the solution in Mysql and get the result expected, but it just can't pass the judge here, any ideas?


  • 0
    S
    select ee.name as employee from
    (select Name, salary, managerid from Employee where MANAGERID is not null) ee
    inner join 
    (select id, name, salary from Employee where managerid is null) er
    on ee.managerid = er.id
    where ee.salary > er.salary;

  • 3
    Y

    "select id, name, salary from Employee where managerid is null"
    Here you assume that no manager has a manager. There is nowhere in the question says this though.


Log in to reply
 

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