SELECT Name
FROM Employee e1
JOIN
(SELECT ManagerId
FROM Employee
GROUP BY ManagerId
HAVING COUNT(ManagerId) >= 5) e2
ON e1.Id = e2.ManagerId
;
570. Managers with at Least 5 Direct Reports
原文:https://www.cnblogs.com/yuesi/p/10163199.html