Write a SQL query to calculate the retention rate of Dashers week-over-week.
Use the dashers and dasher_deliveries tables. A Dasher is active in a week if they completed at least one delivery during that week.
week_start, retained_dashers, prior_week_dashers, and retention_rate_pctweek_start ascending| Column | Type | Description |
|---|---|---|
| dasher_idPK | INT | Unique identifier for a Dasher |
| signup_date | DATE | Date the Dasher signed up |
| is_active | BOOLEAN | Whether the Dasher account is currently active |
| Column | Type | Description |
|---|---|---|
| delivery_idPK | INT | Unique identifier for a delivery |
| dasher_id | INT | Dasher who handled the delivery |
| delivery_date | DATE | Date the delivery was completed or attempted |
| status | VARCHAR(20) | Delivery status, such as completed or cancelled |