Loading exercise…
Loading exercise…
Exercises are built for a keyboard. Read the task here, then open this page on a laptop to solve it.
You asked the AI assistant for monthly revenue with the previous month beside it, for East and West. Daniel Ortiz points out that West's January shows a previous month, although the data starts in January.
AI assistant: “I built monthly revenue for East and West and used LAG to bring in the previous month, ordered by region and month.”
Run the AI query, then fix it so it returns region, month (1 to 12), revenue and prev_revenue (that region's previous month, empty for January), both 2 decimals, completed orders only, for East and West.
Loading the Brightline dataset…
Language
Full plan
SQL ✓ · Excel and Power BI also included
Cancel anytime · 14-day full refund · Secure payment by Stripe