-
Notifications
You must be signed in to change notification settings - Fork 4
LeetCode SQL 50 #23
Answered
by
iamAntimPal
IamShiwangi
asked this question in
Q&A
LeetCode SQL 50
#23
-
Beta Was this translation helpful? Give feedback.
All reactions
Answered by
iamAntimPal
Mar 21, 2025
SELECT e1.employee_id
FROM
Employees AS e1
LEFT JOIN Employees AS e2 ON e1.manager_id = e2.employee_id
WHERE e1.salary < 30000
AND e1.manager_id IS NOT NULL
AND e2.employee_id IS NULL
ORDER BY 1;
for explanation click on me
Replies: 1 comment 1 reply
-
SELECT e1.employee_id
FROM
Employees AS e1
LEFT JOIN Employees AS e2 ON e1.manager_id = e2.employee_id
WHERE e1.salary < 30000
AND e1.manager_id IS NOT NULL
AND e2.employee_id IS NULL
ORDER BY 1;
for explanation click on me
Beta Was this translation helpful? Give feedback.
All reactions
1 reply
-
Thank you sir
Beta Was this translation helpful? Give feedback.
All reactions
Answer selected by
IamShiwangi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment