COUNT(DISTINCT user_id)
within the Register
table.Users
table using SELECT COUNT(user_id) FROM Users
.ROUND
function to round the percentage to two decimal places.contest_id
using GROUP BY
.ORDER BY percentage DESC
.contest_id
in ascending order using ORDER BY contest_id
.erDiagram Users { int user_id PK varchar user_name } Register { int contest_id PK int user_id PK } Users ||--o{ Register : registers