QUERY PLAN
Aggregate (cost=2.88..2.88 rows=1 width=32)
-> Hash Join (cost=1.14..2.87 rows=1 width=6)
Hash Cond: (t.id = r.erp_other_income_ticket_id)
-> Seq Scan on tbl_erp_other_income_tickets t (cost=0.00..1.60 rows=25 width=4)
Filter: ((bank_settle_at <= '2025-12-31 23:59:59+08'::timestamp with time zone) AND (status = 2))
-> Hash (cost=1.11..1.11 rows=2 width=14)
-> Seq Scan on tbl_erp_other_income_ticket_purchase_contract_settles r (cost=0.00..1.11 rows=2 width=14)
Filter: (erp_cost_ticket_id IS NOT NULL)