QUERY PLAN
GroupAggregate (cost=321.97..322.30 rows=19 width=12)
Group Key: project_id
-> Sort (cost=321.97..322.01 rows=19 width=8)
Sort Key: project_id
-> Seq Scan on tbl_cases (cost=0.00..321.56 rows=19 width=8)
Filter: (project_id = ANY ('{3959,3796,3837,3854,3878,3880,3955}'::integer[]))