You are on AirBnb's product team, and they want to know which countries have the most users. (This might enable them to decide which countries they should expand into as a business next.) Using the users table, return country and user_count, ordered by user_count descending, and country ascending for ties.
users
| column | type |
|---|---|
| id | INTEGER |
| name | TEXT |
| TEXT | |
| country | TEXT |
| created_at | DATE |
| id | name | country | created_at | |
|---|---|---|---|---|
| 1 | Alice | alice@example.com | US | 2024-01-01 |
| 2 | Bob | bob@example.com | US | 2024-01-02 |
| 3 | Carol | carol@example.com | UK | 2024-01-03 |
| 4 | Dave | dave@example.com | CA | 2024-01-04 |
| 5 | Eve | eve@example.com | US | 2024-01-05 |
| country | user_count |
|---|---|
| US | 3 |
| CA | 1 |
| UK | 1 |
US has three users — the most of any country. CA and UK each have one user and are tied, so they appear in alphabetical order (CA before UK) due to the secondary ORDER BY country ASC.