Your question is Monthly Spend by Region and Category. Start with the requirements and the one table on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
American Express Global Business Travel wants a clean monthly summary from raw Egencia booking records. Write a SQL query that summarizes total booking spend by month, region, and travel category.
travel_bookings table.booking_date is in March 2024.region, and travel_category.booking_month formatted as YYYY-MMregiontravel_categorytotal_spendbooking_countspend_amount is NULL.booking_month, then region, then travel_category.| Column | Type | Description |
|---|---|---|
| booking_idPK | INT | Unique booking record ID |
| traveler_name | VARCHAR(100) | Traveler full name |
| booking_date | DATE | Date the booking was created |
| region | VARCHAR(50) | Geographic region for the booking |
| travel_category | VARCHAR(50) | Travel category such as Air, Hotel, or Rail |
| spend_amount | DECIMAL(10,2) | Total booking spend |