RideFlow wants to analyze how rider activity changes month over month. Write a PostgreSQL query to calculate user-level ride trends over time using window functions.
growing, declining, or flatuser_id and month.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique rider identifier |
| user_name | VARCHAR(100) | Rider full name |
| signup_date | DATE | Date the rider signed up |
| city_id | INT | Home city reference |
| Column | Type | Description |
|---|---|---|
| city_idPK | INT | Unique city identifier |
| city_name | VARCHAR(100) | City name |
| Column | Type | Description |
|---|---|---|
| ride_idPK | INT | Unique ride identifier |
| user_id | INT | Rider who took the trip |
| ride_date | DATE | Date of the ride |
| status | VARCHAR(20) | Ride status such as completed or cancelled |
| fare_amount | NUMERIC(10,2) | Fare charged for the ride |