QUERY PLAN
Aggregate (cost=473.49..473.50 rows=1 width=32)
-> Hash Join (cost=0.04..473.48 rows=1 width=10)
Hash Cond: (tbl_erp_cash_cost_tickets.reimbursement_id = id)
-> Seq Scan on tbl_erp_cash_cost_tickets (cost=0.00..466.03 rows=2820 width=14)
Filter: ((settle_amount < amount) AND (status = 2))
-> Hash (cost=0.03..0.03 rows=1 width=4)
-> Unique (cost=0.01..0.02 rows=1 width=4)
-> Group (cost=0.01..0.02 rows=1 width=4)
Group Key: id
-> Sort (cost=0.01..0.02 rows=0 width=4)
Sort Key: id
-> Result (cost=0.00..0.00 rows=0 width=4)
One-Time Filter: false