My query

  • 0

    SELECT case when res.num_requests = 0 then 0.00 else ROUND(res.num_accepted*1.0/res.num_requests,2) end as accept_rate
    (SELECT COUNT(DISTINCT f.sender_id, f.send_to_id) as num_requests, COUNT(DISTINCT r.requester_id, r.accepter_id) as num_accepted
    FROM friend_request f, request_accepted r) res

Log in to reply

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