QUERY PLAN
GroupAggregate (cost=177.02..177.08 rows=3 width=12)
Group Key: task_group_id
-> Sort (cost=177.02..177.03 rows=3 width=4)
Sort Key: task_group_id
-> Seq Scan on tbl_tasks (cost=0.00..177.00 rows=3 width=4)
Filter: ((parent_id IS NULL) AND (status = 0) AND (task_group_id = ANY ('{61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42}'::integer[])))