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?.
15 rows affected
id start_flag end_flag
1 0 0
2 1 0
3 0 0
4 0 0
5 0 1
6 0 0
7 1 0
8 0 1
9 0 0
10 0 1
11 0 0
12 0 1
13 1 0
14 0 0
16 0 0
id start_flag end_flag sum status
1 0 0 0 0
2 1 0 1 1
3 0 0 1 1
4 0 0 1 1
5 0 1 2 0
6 0 0 2 0
7 1 0 3 1
8 0 1 4 0
9 0 0 4 0
10 0 1 5 0
11 0 0 5 0
12 0 1 6 0
13 1 0 7 1
14 0 0 7 1
16 0 0 7 1