SQL interview question: Running total of daily revenue
medium
SUM OVER
GROUP BY
window frame
Return each order date with that day's revenue and the running total of revenue up to and including that day. One row per date, ordered by date.
Expected columns: order_date, revenue, running_total. Column names don't have to match. Runs on SQLite in your browser.
Tables: customers + orders
Your query
Ctrl/Cmd + Enter