hard20 pts · first answer countssqlwindow-functions
Running total with tied dates
The sales table has rows (day, amt): (1, 10), (2, 20), (2, 30), (3, 5). What running totals does this query show, in order?
SELECT day, amt,
SUM(amt) OVER (ORDER BY day) AS running
FROM sales
ORDER BY day;