QUERY PLAN
Aggregate (cost=2.36..2.37 rows=1 width=32)
-> Nested Loop (cost=0.00..2.35 rows=1 width=32)
Join Filter: (r.erp_other_income_ticket_id = t.id)
-> Seq Scan on tbl_erp_other_income_tickets t (cost=0.00..1.28 rows=1 width=4)
Filter: ((verify_at <= '2025-12-31 23:59:59+08'::timestamp with time zone) AND (status = 2))
-> Seq Scan on tbl_erp_other_income_ticket_purchase_contract_settles r (cost=0.00..1.03 rows=3 width=36)