Leetcode - 1270. All People Report to the Given Manager
Problem
Solution
SELECT E1.employee_id
FROM Employees AS E1, Employees AS E2, Employees AS E3
WHERE
E1.manager_id = E2.employee_id AND
E2.manager_id = E3.employee_id AND
E3.manager_id = 1 AND e1.employee_id != 1