티스토리 뷰

https://leetcode.com/problems/employees-earning-more-than-their-managers

 

Employees Earning More Than Their Managers - LeetCode

Can you solve this real interview question? Employees Earning More Than Their Managers - Table: Employee +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | name | varchar | | salary | int | | managerId | int | +------

leetcode.com

SELECT e1.Name AS Employee
FROM Employee e1
JOIN Employee e2 ON e1.ManagerId = e2.Id 
    AND e1.Salary > e2.Salary

'프로그래밍연습 > SQL' 카테고리의 다른 글

[SQL]human-traffic-of-stadium  (0) 2023.08.18
[SQL]trips-and-users  (0) 2023.08.18
[SQL]consecutive-numbers  (0) 2023.08.17
[SQL]SecondHighestSalary_leatcode  (0) 2023.08.17
[SQL]오프라인/온라인 판매 데이터 통합하기  (0) 2023.08.16
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
글 보관함