How would you write a SQL query to get the top 3 cities per month by trip count?
Use the trips and cities tables. Count trips with a valid city and timestamp, and break equal counts alphabetically by city name.
month, city, and trip_count.| Column | Type | Description |
|---|---|---|
| trip_idPK | INT | Unique trip identifier |
| city_id | INT | City associated with the trip |
| started_at | TIMESTAMP | Timestamp when the trip started |
| Column | Type | Description |
|---|---|---|
| city_idPK | INT | Unique city identifier |
| city_name | VARCHAR(100) | Display name of the city |