Employees Earning More Than Their Managers

看似复杂,其实很简单,两表内连接就好了
https://leetcode.com/problems/employees-earning-more-than-their-managers/

SELECT E1.Name FROM Employee E1 INNER JOIN Employee E2 WHERE E1.Salary>E2.Salary AND E1.ManagerId=E2.Id

你可能感兴趣的:(Employees Earning More Than Their Managers)