This problem is paper-only - see explanation for the canonical SQL solution.
Given Orders(id, customer_id, order_date, total), return each row plus a running_total column that is the cumulative spend for that customer up to and including the current row, ordered by (order_date, id) within each customer. Sort the output by customer_id ascending, order_date ascending, id ascending.
For the auto-grader: return [{ id, customer_id, order_date, total, running_total }].