Skip to content

Commit

Permalink
solve friends requests i
Browse files Browse the repository at this point in the history
  • Loading branch information
yosuke-furukawa committed Sep 22, 2020
1 parent 16feed4 commit b03d745
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frinds-requests-i/solution.sql
@@ -0,0 +1,5 @@
# Write your MySQL query statement below
SELECT COALESCE(ROUND(e1.accepts/e2.requests,2), 0) as accept_rate FROM
(SELECT COUNT(DISTINCT requester_id, accepter_id) as accepts FROM request_accepted) e1,
(SELECT COUNT(DISTINCT sender_id, send_to_id) as requests FROM friend_request) e2;

0 comments on commit b03d745

Please sign in to comment.