How do you write a query to identify top-performing customer cohorts over a 6-month period?
Calculate cohort performance for customers who signed up from January through June 2024, using completed Bolt rides during the same period.
cohort_month, cohort_customers, completed_rides, total_revenue, and performance_rank.performance_rank ascending, then cohort_month ascending. Ties should share the same rank.| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer display name |
| signup_date | DATE | Date the customer joined Bolt |
| VARCHAR(255) | Customer email address |
| Column | Type | Description |
|---|---|---|
| ride_idPK | INT | Unique ride identifier |
| customer_id | INT | Customer who took the ride |
| ride_date | DATE | Date of the ride |
| ride_status | VARCHAR(20) | Ride completion status |
| fare_amount | DECIMAL(10,2) | Fare charged for the ride |