add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
version
PostgreSQL 14.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4), 64-bit
20 rows affected
20 rows affected
20 rows affected
sales_date amount friday compute_friday sum
2022-01-01 3 2021-12-31 2022-01-07 3
2022-01-02 6 2021-12-31 2022-01-07 9
2022-01-03 9 2022-01-07 2022-01-07 18
2022-01-04 5 2022-01-07 2022-01-07 23
2022-01-05 1 2022-01-07 2022-01-07 24
2022-01-06 5 2022-01-07 2022-01-07 29
2022-01-07 3 2022-01-07 2022-01-07 32
2022-01-08 4 2022-01-07 2022-01-14 4
2022-01-09 9 2022-01-07 2022-01-14 13
2022-01-10 8 2022-01-14 2022-01-14 21
2022-01-11 8 2022-01-14 2022-01-14 29
2022-01-12 2 2022-01-14 2022-01-14 31
2022-01-13 8 2022-01-14 2022-01-14 39
2022-01-14 4 2022-01-14 2022-01-14 43
2022-01-15 4 2022-01-14 2022-01-21 4
2022-01-16 3 2022-01-14 2022-01-21 7
2022-01-17 9 2022-01-21 2022-01-21 16
2022-01-18 6 2022-01-21 2022-01-21 22
2022-01-19 2 2022-01-21 2022-01-21 24
2022-01-20 4 2022-01-21 2022-01-21 28