How would you use a window function to calculate the running total of bookings per day for a specific hotel brand on Expedia Group?
Write a PostgreSQL query for the Expedia Collection brand. Include only confirmed bookings and calculate the daily booking count before calculating the cumulative total.
booking_date, daily_bookings, and running_totalbooking_date ascending| Column | Type | Description |
|---|---|---|
| hotel_idPK | INT | Unique hotel identifier |
| hotel_name | VARCHAR(150) | Hotel property name |
| brand_name | VARCHAR(100) | Hotel brand associated with the property |
| Column | Type | Description |
|---|---|---|
| booking_idPK | INT | Unique booking identifier |
| hotel_id | INT | Referenced hotel identifier |
| booking_date | DATE | Date on which the booking was made |
| status | VARCHAR(20) | Booking status |