How would you structure a database schema to track rider promotional codes and their redemption rates across different cities for Uber?
Use the provided normalized tables to calculate monthly redemption performance for January and February 2025. Treat a rider as redeemed when an assignment has at least one redemption with status redeemed.
Output
- One row per month, city, and promotional code with at least one assignment.
- Columns:
month_start, city_name, promo_code, assigned_riders, redeemed_riders, redemption_rate_pct, city_rank, and prior_month_rate_pct.
- Rank rows within each month by redemption rate, with ties sharing a rank. Sort by month, city, and promotional code.