代码语言:javascript复制
select
round(
ifnull(
1/(count(
distinct f1.sender_id,f1.send_to_id)
/count(distinct r1.requester_id,r1.accepter_id)),0),2)
accept_rate
from friendrequest f1 , requestaccepted r1