Uber's marketplace analytics team wants to identify the most frequently traveled routes. Write a PostgreSQL query that returns the top 10 origin and destination city pairs based on completed rides.
status = 'completed' and exclude rides missing either city.| Column | Type | Description |
|---|---|---|
| ride_idPK | INT | Unique ride identifier |
| pickup_city_id | INT | References the pickup city |
| dropoff_city_id | INT | References the dropoff city |
| status | VARCHAR(20) | Ride lifecycle status |
| requested_at | TIMESTAMP | Ride request timestamp |
| Column | Type | Description |
|---|---|---|
| city_idPK | INT | Unique city identifier |
| city_name | VARCHAR(100) | City name |
| region | VARCHAR(50) | Geographic region |