33. Percentage of Users Attended a Contest
https://leetcode.com/problems/percentage-of-users-attended-a-contest/submissions/1453048443/
Write a solution to find the percentage of the users registered in each contest rounded to two decimals. Return the result table ordered by percentage in descending order. In case of a tie, order it by contest_id in ascending order.
select contest_id, round((count(R.user_id)/(select count(*) from users))*100,2) percentage from Users U join Register R on U.user_id = R.user_id group by contest_id order by 2 desc, 1