[LeetCode] 181. Employees Earning More Than Their Managers
2022. 11. 27. 15:18ㆍTIL💡/Database
https://leetcode.com/problems/calculate-special-bonus/?envType=study-plan&id=sql-i
어차피 Manager도 Employee의 일부로 이것도 셀프 조인 문제로, 굉장히 많이 보였던 유형이다.
SELECT e1.name AS Employee
FROM Employee e1
JOIN Employee e2
ON e1.managerId = e2.id
WHERE e1.salary > e2.salary;
'TIL💡 > Database' 카테고리의 다른 글
[LeetCode] 534. Game Play Analysis III (0) | 2022.11.27 |
---|---|
[LeetCode] 511. Game Play Analysis I (0) | 2022.11.27 |
[LeetCode] 177. Nth Highest Salary (0) | 2022.11.27 |
[MySQL] 196. Delete Duplicate Emails (0) | 2022.11.27 |
[MySQL] 1873. Calculate Special Bonus (0) | 2022.11.27 |