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?.
3 rows affected
6 rows affected
login day count rollingavg
UserA 2019-12-29 0 0.50000000000000000000
UserA 2019-12-30 0 0.60000000000000000000
UserA 2019-12-31 0 0.50000000000000000000
UserA 2020-01-01 2 0.42857142857142857143
UserA 2020-01-02 1 0.50000000000000000000
UserA 2020-01-03 0 0.60000000000000000000
UserA 2020-01-04 0 0.75000000000000000000
UserB 2019-12-29 0 0.25000000000000000000
UserB 2019-12-30 0 0.20000000000000000000
UserB 2019-12-31 0 0.33333333333333333333
UserB 2020-01-01 1 0.28571428571428571429
UserB 2020-01-02 0 0.33333333333333333333
UserB 2020-01-03 1 0.40000000000000000000
UserB 2020-01-04 0 0.50000000000000000000