Skip to content

Commit 5130a71

Browse files
authoredOct 9, 2023
feat: add sql solution to lc problem: No.1978 (#1774)
1 parent 806111f commit 5130a71

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
 

‎solution/1900-1999/1978.Employees Whose Manager Left the Company/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,12 @@ WHERE b.employee_id IS NULL AND a.salary < 30000 AND a.manager_id IS NOT NULL
8080
ORDER BY a.employee_id;
8181
```
8282

83+
```sql
84+
# Write your MySQL query statement below
85+
SELECT employee_id
86+
FROM Employees
87+
WHERE salary < 30000 AND manager_id NOT IN (SELECT employee_id FROM Employees)
88+
ORDER BY employee_id;
89+
```
90+
8391
<!-- tabs:end -->

‎solution/1900-1999/1978.Employees Whose Manager Left the Company/README_EN.md

+8
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,12 @@ WHERE b.employee_id IS NULL AND a.salary < 30000 AND a.manager_id IS NOT NULL
7272
ORDER BY a.employee_id;
7373
```
7474

75+
```sql
76+
# Write your MySQL query statement below
77+
SELECT employee_id
78+
FROM Employees
79+
WHERE salary < 30000 AND manager_id NOT IN (SELECT employee_id FROM Employees)
80+
ORDER BY employee_id;
81+
```
82+
7583
<!-- tabs:end -->

0 commit comments

Comments
 (0)
Please sign in to comment.