QUERY PLAN
GroupAggregate (cost=352.77..353.16 rows=22 width=12)
Group Key: project_id
-> Sort (cost=352.77..352.83 rows=22 width=8)
Sort Key: project_id
-> Seq Scan on tbl_cases (cost=0.00..352.28 rows=22 width=8)
Filter: (project_id = ANY ('{4097,4114,4124,4127,4120,4111,4052,3797}'::integer[]))