| Aggregate (cost=107.20..107.21 rows=1 width=32) |
| -> Nested Loop (cost=36.47..107.20 rows=1 width=6) |
| -> Hash Join (cost=36.33..105.80 rows=2 width=10) |
| Hash Cond: (t.id = r.erp_collect_ticket_id) |
| -> Seq Scan on tbl_erp_collect_tickets t (cost=0.00..68.94 rows=138 width=4) |
| Filter: ((bank_settle_at <= '2025-12-31 23:59:59+08'::timestamp with time zone) AND (status = 2)) |
| -> Hash (cost=35.94..35.94 rows=31 width=14) |
| -> Seq Scan on tbl_erp_collect_ticket_settles r (cost=0.00..35.94 rows=31 width=14) |
| Filter: (erp_other_collect_ticket_id IS NOT NULL) |
| -> Index Scan using tbl_erp_other_collect_tickets_pkey on tbl_erp_other_collect_tickets oc (cost=0.14..0.68 rows=1 width=4) |
| Index Cond: (id = r.erp_other_collect_ticket_id) |
| Filter: (is_start OR (bank_settle_at <= '2025-12-31 23:59:59+08'::timestamp with time zone)) |