QUERY PLAN
GroupAggregate (cost=165.19..165.34 rows=7 width=12)
Group Key: parent_id
-> Sort (cost=165.19..165.22 rows=11 width=4)
Sort Key: parent_id
-> Seq Scan on tbl_tasks (cost=0.00..165.00 rows=11 width=4)
Filter: ((status = 1) AND (parent_id = ANY ('{1224,1223,1222,1221,1211,1210,1209,1247,1215,1195,1256,1216}'::integer[])))