[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
Calculate Special Bonus - LeetCode
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
leetcode.com
어차피 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 |