Q&A about the site for enthusiasts and scholars of mythology and folklore
SELECT ROW_NUMBER() OVER (PARTITION BY location ORDER BY COUNT(*) DESC) AS row_num, location, COUNT(*) AS user_count FROM users GROUP BY location ORDER BY user_count DESC;