QUERY PLAN
GroupAggregate (cost=311.27..311.62 rows=20 width=12)
Group Key: project_id
-> Sort (cost=311.27..311.32 rows=20 width=8)
Sort Key: project_id
-> Seq Scan on tbl_cases (cost=0.00..310.84 rows=20 width=8)
Filter: (project_id = ANY ('{3704,3701,3468,3241,3242,3086,2655,2590}'::integer[]))