diff --git a/solution/1900-1999/1978.Employees Whose Manager Left the Company/README.md b/solution/1900-1999/1978.Employees Whose Manager Left the Company/README.md index 89aff87c0392f..0e069884423f9 100644 --- a/solution/1900-1999/1978.Employees Whose Manager Left the Company/README.md +++ b/solution/1900-1999/1978.Employees Whose Manager Left the Company/README.md @@ -80,4 +80,12 @@ WHERE b.employee_id IS NULL AND a.salary < 30000 AND a.manager_id IS NOT NULL ORDER BY a.employee_id; ``` +```sql +# Write your MySQL query statement below +SELECT employee_id +FROM Employees +WHERE salary < 30000 AND manager_id NOT IN (SELECT employee_id FROM Employees) +ORDER BY employee_id; +``` + diff --git a/solution/1900-1999/1978.Employees Whose Manager Left the Company/README_EN.md b/solution/1900-1999/1978.Employees Whose Manager Left the Company/README_EN.md index f40caaf1ef635..2409a6cc8626a 100644 --- a/solution/1900-1999/1978.Employees Whose Manager Left the Company/README_EN.md +++ b/solution/1900-1999/1978.Employees Whose Manager Left the Company/README_EN.md @@ -72,4 +72,12 @@ WHERE b.employee_id IS NULL AND a.salary < 30000 AND a.manager_id IS NOT NULL ORDER BY a.employee_id; ``` +```sql +# Write your MySQL query statement below +SELECT employee_id +FROM Employees +WHERE salary < 30000 AND manager_id NOT IN (SELECT employee_id FROM Employees) +ORDER BY employee_id; +``` +