LeetCode/릿코드-Employees Earning More Than Their Managers-MySQL

cosmos·2021년 9월 23일
0
post-thumbnail
post-custom-banner

문제


풀이

  • write an sql query to find the employees who earn more than their managers.
  • return the result table in any order.
  • the query result format is the following example.

쿼리

-- leetcode, Employees Earning More Than Their Managers, mysql
SELECT T1.Name AS Employee
FROM Employee AS T1, Employee AS T2
WHERE T1.Salary >= T2.Salary AND T1.ManagerId = T2.Id

결과


출처 && 깃허브

leetcode
github

post-custom-banner

0개의 댓글