my solution using all which can handle tie issues


  • 0
    P

    SELECT id, count() as num FROM
    (select requester_id as id FROM request_accepted
    UNION ALL
    select accepter_id as id FROM request_accepted ) sub
    GROUP BY id
    having count(
    ) >= ALL (SELECT count(*) as num FROM
    (select requester_id as id FROM request_accepted
    UNION ALL
    select accepter_id as id FROM request_accepted ) sub
    GROUP BY id)


Log in to reply
 

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