PostgreSQL - Window Functions in PostgreSQL
Given the table
sales(date, amount) ordered by date, what will the following query return?SELECT date, amount, SUM(amount) OVER (ORDER BY date RANGE BETWEEN INTERVAL '1 day' PRECEDING AND CURRENT ROW) AS running_sum FROM sales;
