PostgreSQL - Window Functions in PostgreSQL
Given the table
What is the output of this query?
sales(date, amount) with rows:('2024-01-01', 100), ('2024-01-02', 150), ('2024-01-03', 200)What is the output of this query?
SELECT date, amount, SUM(amount) OVER (ORDER BY date ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS running_total FROM sales ORDER BY date;
