QUERY PLAN
GroupAggregate (cost=106.09..106.16 rows=4 width=12)
Group Key: case_id
-> Sort (cost=106.09..106.10 rows=4 width=4)
Sort Key: case_id
-> Seq Scan on tbl_pre_sales (cost=0.00..106.05 rows=4 width=4)
Filter: ((created_by = 1017) AND (case_id = ANY ('{8268,8231,8243,8212,8176,8179,8178,8182,7981,7987}'::integer[])))