SELECT Name
FROM Employee e1
JOIN
(SELECT ManagerId
FROM Employee
GROUP BY ManagerId
HAVING COUNT(ManagerId) >= 5) e2
ON e1.Id = e2.ManagerId
;
SELECT Name
FROM Employee e1
JOIN
(SELECT ManagerId
FROM Employee
GROUP BY ManagerId
HAVING COUNT(ManagerId) >= 5) e2
ON e1.Id = e2.ManagerId
;