QUERY PLAN
GroupAggregate (cost=353.31..353.70 rows=22 width=12)
Group Key: project_id
-> Sort (cost=353.31..353.37 rows=22 width=8)
Sort Key: project_id
-> Seq Scan on tbl_cases (cost=0.00..352.82 rows=22 width=8)
Filter: (project_id = ANY ('{4185,4183,4181,4173,4171,4152,4150,4158}'::integer[]))