QUERY PLAN
Append (cost=0.00..99.78 rows=9 width=150)
-> Seq Scan on tbl_purchase_contracts (cost=0.00..93.59 rows=7 width=149)
Filter: ((cost_type = 1) AND (supplier_id = 431) AND ((amount - erp_all_settle_amount) > '0'::numeric))
-> Seq Scan on tbl_erp_cost_tickets (cost=0.00..3.19 rows=1 width=170)
Filter: ((status = 2) AND (supplier_id = 431) AND ((amount - all_settle_amount) > '0'::numeric))
-> Seq Scan on tbl_erp_other_payment_tickets (cost=0.00..2.91 rows=1 width=138)
Filter: ((status = 2) AND (supplier_id = 431) AND ((amount - all_settle_amount) > '0'::numeric))