Skip to content

Commit 82c56cd

Browse files
committed
[1633] [Time Beats: undefined] - LeetPush
1 parent 91a426e commit 82c56cd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
SELECT r.contest_id, ROUND(COUNT(u.user_id ) / (
2+
SELECT COUNT(user_id)
3+
FROM Users
4+
) * 100, 2)
5+
AS percentage
6+
FROM Register r
7+
LEFT JOIN Users u
8+
ON r.user_id = u.user_id
9+
GROUP BY r.contest_id
10+
ORDER BY percentage DESC, r.contest_id ASC

0 commit comments

Comments
 (0)