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?.
INSERT 0 17
id user_id occurred_at passed
1 1 2020-01-01 08:00:00 null
2 1 2020-01-01 08:08:00 null
3 1 2020-01-01 08:10:00 t
4 1 2020-01-01 10:00:00 f
5 1 2020-01-01 10:05:00 f
6 1 2020-01-01 10:09:59 t
16 1 2020-01-01 20:01:00 f
7 2 2020-01-01 14:23:00 null
8 2 2020-01-01 14:24:00 null
9 2 2020-01-01 14:26:00 t
10 2 2020-01-01 14:27:00 t
17 2 2020-01-01 20:02:00 f
11 3 2020-01-01 11:00:00 null
12 3 2020-01-01 11:01:00 null
13 3 2020-01-01 15:26:00 f
14 3 2020-01-01 18:00:00 f
15 3 2020-01-01 20:00:00 f
SELECT 17
qualifying_sets
2
SELECT 1
user_id qualifying_sets
1 2
2 2
SELECT 2