Open yokostan opened 5 years ago
# Write your MySQL query statement below SELECT e.Name as Employee FROM Employee e WHERE e.Salary > ( SELECT Salary FROM Employee WHERE Id = e.ManagerId )
Above solution runtime beats 5%. Here is the most common one:
select a.name as Employee from employee as A, employee as B where a.ManagerID=b.ID and a.salary > b.salary