QUERY PLAN
GroupAggregate (cost=332.06..332.43 rows=21 width=12)
Group Key: project_id
-> Sort (cost=332.06..332.11 rows=21 width=8)
Sort Key: project_id
-> Seq Scan on tbl_cases (cost=0.00..331.60 rows=21 width=8)
Filter: (project_id = ANY ('{3959,3796,3837,3854,3878,3880,3955,3954}'::integer[]))