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 ('{3819,3805,3814,3817,3811,3821,3818,3816}'::integer[]))