Q&A for linguists, teachers and students of the Korean language
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;