Skip to content

Commit 7fefac2

Browse files
committed
finish Percentage of Users Attnded a Contest
1 parent 2a75bfe commit 7fefac2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
select contest_id,
2+
round(count(distinct user_id) / (select count(user_id) from Users) * 100, 2) as percentage
3+
from Register
4+
group by contest_id
5+
order by percentage desc, contest_id asc;

0 commit comments

Comments
 (0)