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?.
id name start end count
1 A 2018-12-10 2018-12-20 34
2 B 2018-12-15 2018-12-27 19
3 C 2018-12-16 2018-12-20 56
4 D 2018-12-25 2018-12-30 43
SELECT 4
acts sum start end
{B,D} 62 2018-12-15 2018-12-30
{A,B,C} 109 2018-12-10 2018-12-27
{A,B} 53 2018-12-10 2018-12-27
SELECT 3