18 - 各赛事的用户注册率
sql
-- 注册率=注册用户数/所有用户数
select
r.contest_id,round(100*count(*)/(select count(*) from Users),2) percentage
from
Register r
group by
r.contest_id
order by
percentage desc,r.contest_id ASC;