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?.
11 rows affected
payment_date | payment_date |
---|---|
300 | 2019-11-15 00:00:00+00 |
1000 | 2019-11-15 00:00:00+00 |
250 | 2019-11-15 00:00:00+00 |
300 | 2019-11-15 00:00:00+00 |
300 | 2019-10-15 00:00:00+01 |
130 | 2019-10-15 00:00:00+01 |
100 | 2019-10-15 00:00:00+01 |
1300 | 2019-09-15 00:00:00+01 |
1300 | 2019-09-15 00:00:00+01 |
400 | 2019-08-15 00:00:00+01 |
400 | 2019-08-15 00:00:00+01 |
payment_type_id | month_15 | sum |
---|---|---|
1 | 2019-08-15 00:00:00 | 800 |
1 | 2019-09-15 00:00:00 | 2600 |
1 | 2019-10-15 00:00:00 | 530 |
1 | 2019-11-15 00:00:00 | 1850 |