SwiftRide wants to identify which cities are growing fastest in completed rides month over month. Write a SQL query to return the top cities by ride growth rate for each month.
(current_month_rides - previous_month_rides) / previous_month_rides * 100.| Column | Type | Description |
|---|---|---|
| city_idPK | INT | Unique city identifier |
| city_name | VARCHAR(100) | City name |
| region | VARCHAR(50) | Operating region for the city |
| Column | Type | Description |
|---|---|---|
| driver_idPK | INT | Unique driver identifier |
| city_id | INT | Driver's assigned city |
| driver_name | VARCHAR(100) | Driver full name |
| status | VARCHAR(20) | Driver status such as active or inactive |
| Column | Type | Description |
|---|---|---|
| ride_idPK | INT | Unique ride identifier |
| driver_id | INT | Driver associated with the ride |
| rider_id | INT | Rider identifier |
| ride_date | DATE | Date the ride occurred |
| ride_status | VARCHAR(20) | Ride status such as completed or cancelled |
| fare_amount | NUMERIC(10,2) | Fare charged for the ride |