skip to Main Content

Iterate through data and calculate the sum of the last three days of each month – Postgresql

DB-Fiddle CREATE TABLE sales ( id SERIAL PRIMARY KEY, event_date DATE, sales_volume INT ); INSERT INTO sales (event_date, sales_volume) VALUES ('2023-01-27', '900'), ('2023-02-28', '500'), ('2023-01-29', '100'), ('2023-01-30', '600'), ('2023-01-31', '450'), ('2023-02-25', '300'), ('2023-02-26', '250'), ('2023-02-27', '845'), ('2023-02-28', '520'), ('2023-03-26', '750'),…

VIEW QUESTION
Back To Top
Search