▸_sqlgym

2. Running Total of Sales

EasyWindow FunctionsSUM() OVERORDER BY frame

A window function computes across a set of rows related to the current row without collapsing them like GROUP BY would.

Task: for each day return day, amount, and a running_total — the cumulative sum of amount up to and including that day. Order by day.

Tables
Loading schema…
Expected outputrows must come back in this order
Computing expected output…

This is the result for the example data above. On Submit your query is graded against this example plus 4 hidden edge cases 5test cases in all. A sloppy query that only fits the example won't pass.

SQL
⌘/Ctrl+↵ run · ⇧⌘/Ctrl+↵ submit
Run a query to see its output here.