QUERY PLAN
GroupAggregate (cost=119.44..119.75 rows=18 width=12)
Group Key: case_id
-> Sort (cost=119.44..119.48 rows=18 width=4)
Sort Key: case_id
-> Seq Scan on tbl_pre_sales (cost=0.00..119.06 rows=18 width=4)
Filter: ((NOT is_draft) AND (case_id = ANY ('{9250,9240,9247,9244,9239,9237,9238,9236,9235,9229,9233,9232,9230,9228,9222}'::integer[])))