QUERY PLAN
Append (cost=0.00..25.71 rows=2 width=198)
-> Seq Scan on tbl_erp_advance_payment_tickets (cost=0.00..12.71 rows=1 width=198)
Filter: ((un_paid_amount > '0'::numeric) AND (client_id = 982))
-> Seq Scan on tbl_erp_other_collect_tickets (cost=0.00..12.98 rows=1 width=198)
Filter: ((client_id = 982) AND ((amount - settle_amount) > '0'::numeric))