By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE
INSERT 0 11
| supply | demand | week_start_date | sum |
|---|---|---|---|
| 1500 | 500 | 2024-04-15 | 1000 |
| 0 | 500 | 2024-04-22 | 500 |
| 0 | 500 | 2024-04-29 | 0 |
| 0 | 500 | 2024-05-06 | -500 |
| 500 | 500 | 2024-05-20 | -500 |
| 0 | 500 | 2024-06-03 | -1000 |
| 0 | 500 | 2024-06-10 | -1500 |
| 0 | 500 | 2024-06-17 | -2000 |
| 10000 | 500 | 2024-06-24 | 7500 |
| 0 | 500 | 2024-07-01 | 7000 |
| 0 | 500 | 2024-07-08 | 6500 |
SELECT 11