Simple solution using nested select


  • 0
    N
    select a.Name as Employee from Employee a 
    where a.Salary > (select b.Salary from Employee b where a.ManagerId = b.Id)
    

Log in to reply
 

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