QUERY PLAN
Aggregate (cost=2.73..2.73 rows=1 width=64)
-> Seq Scan on tbl_erp_other_collect_tickets (cost=0.00..2.66 rows=12 width=9)
Filter: ((bank_settle_at IS NOT NULL) AND (settle_amount < amount) AND (status = 2))