Straightforward and Easy to Understand


  • 0
    S
    SELECT E1.Name as Employee 
    FROM Employee e1, Employee e2 # Implicit Inner Join
    WHERE 
        E1.ManagerID IS NOT NULL  # Optional condition
        AND E1.ManagerId = E2.Id
        AND E1.Salary > E2.Salary
    

Log in to reply
 

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