QUERY PLAN
Aggregate (cost=502.73..502.74 rows=1 width=32)
-> Seq Scan on tbl_erp_cash_cost_tickets (cost=0.00..502.72 rows=5 width=5)
Filter: ((purchase_contract_id = 4475) AND (status = ANY ('{1,2,5}'::integer[])))