QUERY PLAN
GroupAggregate (cost=448.49..449.39 rows=51 width=12)
Group Key: project_id
-> Sort (cost=448.49..448.62 rows=52 width=8)
Sort Key: project_id
-> Seq Scan on tbl_cases (cost=0.00..447.01 rows=52 width=8)
Filter: (project_id = ANY ('{3940,3807,3256,3841,3906,3874,3873,3797,3781,3776,3740,3657,3708,3707,3706,3705,3522,3709,3676,3504}'::integer[]))