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 13.7 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10), 64-bit
12 rows affected
cohort retention_week n_users retention_r
2019-03-18 1 6 33%
2019-03-18 2 6 17%
2019-03-18 3 6 17%
2019-04-01 1 3 67%
2019-04-01 2 3 0%
2019-04-08 1 3 100%
cohort dt_start_wk retained
2019-03-18 2019-03-18 2
2019-03-18 2019-03-25 1
2019-03-18 2019-04-01 1
2019-04-01 2019-04-01 2
2019-04-01 2019-04-08 0
2019-04-08 2019-04-08 3