QUERY PLAN
GroupAggregate (cost=301.79..302.10 rows=18 width=12)
Group Key: project_id
-> Sort (cost=301.79..301.83 rows=18 width=8)
Sort Key: project_id
-> Seq Scan on tbl_cases (cost=0.00..301.41 rows=18 width=8)
Filter: (project_id = ANY ('{3819,3805,3814,3817,3811,3818,3816}'::integer[]))