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?.
CREATE TABLE
INSERT 0 15
user_id beg_period end_period def_ending
159 2023-01-01 2023-01-30 X
414 2022-07-01 2022-09-30
480 2022-09-02 2022-11-01 X
503 2022-07-19 2022-07-23
SELECT 4
user_id beg_period end_period def_ending grp rn
159 2023-01-01 2023-01-30 X 1 1
414 2022-07-01 2022-09-30 1 1
480 2022-09-02 2022-11-01 X 1 1
503 2022-07-19 2022-07-23 1 1
SELECT 4