QUERY PLAN
Aggregate (cost=2.77..2.78 rows=1 width=8)
-> Append (cost=0.00..2.77 rows=1 width=0)
-> Subquery Scan on "*SELECT* 2" (cost=0.00..2.77 rows=1 width=0)
-> Seq Scan on tbl_erp_other_collect_tickets (cost=0.00..2.76 rows=1 width=238)
Filter: ((status = 2) AND (supplier_id = 431) AND ((amount - all_settle_amount) > '0'::numeric))