WITH votes AS (
SELECT user_id, count(user_id) as Number_of_Votes
FROM discourse_voting_votes dvv
WHERE dvv.archive = false
GROUP BY user_id
ORDER BY Number_of_Votes DESC
)
SELECT Number_of_Votes, count(*) AS Number_of_Users
FROM votes
GROUP BY Number_of_Votes
ORDER BY Number_of_Votes DESC