LeetCode-SQL-597. 好友申请 I :总体通过率
程序员文章站
2022-06-11 14:28:40
...
select
round(
ifnull(
(select count(*) from (select distinct requester_id, accepter_id from request_accepted) as A)
/
(select count(*) from (select distinct sender_id, send_to_id from friend_request) as B),
0)
, 2) as accept_rate;