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 ('{2939,3915,3914,3888,3864,3937,3939,3921,3931,3232,3461,3695,3778,3832,3849,3868,3923,3927,3938,3907}'::integer[]))