MLB wants a daily view of ticket sales for each stadium, including dates when a stadium has no game. Write a PostgreSQL query for April 1 through April 3, 2024.
Requirements
- Generate every date and stadium combination in the reporting range.
- Include only ticket sales from completed MLB games.
- Treat missing sales as zero, then calculate each stadium's rolling seven-calendar-day average. Because the date spine is complete, the window must include zero-sales dates.
- Return stadium name, date, daily ticket sales, and the rolling average, rounded to two decimals.
- Order by stadium name and report date.