By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE
INSERT 0 6
| created_at | total_orders | total_price | taxes | shipping | average_order_value | total_discount | net_sales |
|---|---|---|---|---|---|---|---|
| 2022-07-26 00:00:00 | 1 | 200 | 250 | 150 | 200.0000000000000000 | 15 | -215 |
| 2022-07-25 00:00:00 | 1 | 200 | 250 | 150 | 200.0000000000000000 | 15 | -215 |
| 2022-07-24 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 2022-07-23 00:00:00 | 2 | 200 | 200 | 200 | 100.0000000000000000 | 20 | -220 |
| 2022-07-22 00:00:00 | 1 | 300 | 500 | 200 | 300.0000000000000000 | 5 | -405 |
| 2022-07-21 00:00:00 | 1 | 100 | 100 | 100 | 100.0000000000000000 | 10 | -110 |
| 2022-07-20 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
SELECT 7
| created_at | total_orders | total_price | taxes | shipping | average_order_value | total_discount | net_sales |
|---|---|---|---|---|---|---|---|
| 2022-07-26 00:00:00+01 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 2022-07-25 00:00:00+01 | 1 | 200 | 250 | 150 | 200.0000000000000000 | 15 | -215 |
| 2022-07-24 00:00:00+01 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 2022-07-23 00:00:00+01 | 2 | 200 | 200 | 200 | 100.0000000000000000 | 20 | -220 |
| 2022-07-22 00:00:00+01 | 1 | 300 | 500 | 200 | 300.0000000000000000 | 5 | -405 |
| 2022-07-21 00:00:00+01 | 1 | 100 | 100 | 100 | 100.0000000000000000 | 10 | -110 |
| 2022-07-20 00:00:00+01 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
SELECT 7