QUERY PLAN
GroupAggregate (cost=309.90..310.09 rows=11 width=12)
Group Key: project_id
-> Sort (cost=309.90..309.93 rows=11 width=8)
Sort Key: project_id
-> Seq Scan on tbl_cases (cost=0.00..309.71 rows=11 width=8)
Filter: (project_id = ANY ('{4172,4169,4168,4157}'::integer[]))