Simple solution w/ WHERE EXISTS... IN .. subquery


  • 0
    S
    SELECT t1.Name
    FROM Employee t1
    WHERE t1.Id IN (
            SELECT ManagerId
            FROM Employee
            GROUP BY ManagerId
            HAVING COUNT(ManagerId) >=5
        )
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.