Scenario SQL Question
Calculate 7-Day Rolling Average Revenue
Build mastery in Date Operations with this scenario-based SQL challenge and live execution support.
Problem Statement
For 2024, compute a trailing 7-row moving average of daily revenue. Return order_date, daily_revenue, and rolling_avg_7days (rounded to 2 dp) — ordered by order_date.
Relevant Tables
orders
SQL Concepts Used in This Scenario
Strengthen your understanding with these targeted learning topics: