QUERY PLAN
Aggregate (cost=12.40..12.41 rows=1 width=32)
-> Seq Scan on tbl_erp_advance_payment_tickets t (cost=0.00..12.40 rows=1 width=32)
Filter: (is_payment_settle AND (bank_settle_at <= '2025-12-31 23:59:59+08'::timestamp with time zone) AND (status = 2))