가장 많은 친구를 가진 사람과 그 친구의 수를 찾아라
WITH count_id AS (
SELECT requester_id AS id
FROM RequestAccepted
UNION ALL
SELECT accepter_id AS id
FROM RequestAccepted
)
SELECT id
,COUNT(*) num
FROM count_id
GROUP BY id
ORDER BY num DESC
LIMIT 1
SELECT m.name
FROM employee as e
INNER JOIN employee as m
ON e.managerId=m.id
GROUP BY e.managerId
HAVING COUNT(m.id)>=5