Share My Accepted SQL Query using "union all", the first Accepted answer of all


  • 5
    R
    select id, count(*) num from 
    (
          (select requester_id id from request_accepted) 
          union all 
          (select accepter_id id from request_accepted)
    ) tb 
    group by id order by num desc limit 1
    

Log in to reply
 

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