QUERY PLAN
Aggregate (cost=76.80..76.81 rows=1 width=32)
-> Sort (cost=76.63..76.66 rows=11 width=1018)
Sort Key: b.is_delete, b.sort
-> GroupAggregate (cost=76.06..76.44 rows=11 width=1018)
Group Key: b.id
-> Sort (cost=76.06..76.09 rows=11 width=79)
Sort Key: b.id
-> Hash Left Join (cost=74.65..75.87 rows=11 width=79)
Hash Cond: (b.id = f.erp_bank_id)
-> Hash Right Join (cost=1.25..2.42 rows=11 width=15)
Hash Cond: (t.id = b.id)
-> Seq Scan on tbl_erp_banks t (cost=0.00..1.14 rows=11 width=10)
Filter: (created_at <= '2026-12-31 23:59:59+08'::timestamp with time zone)
-> Hash (cost=1.11..1.11 rows=11 width=9)
-> Seq Scan on tbl_erp_banks b (cost=0.00..1.11 rows=11 width=9)
-> Hash (cost=73.31..73.31 rows=7 width=68)
-> Subquery Scan on f (cost=73.14..73.31 rows=7 width=68)
-> HashAggregate (cost=73.14..73.24 rows=7 width=68)
Group Key: t_1.erp_bank_id
-> Seq Scan on tbl_erp_bank_amount_change_logs t_1 (cost=0.00..59.96 rows=1757 width=15)
Filter: (settle_at <= '2026-12-31 23:59:59+08'::timestamp with time zone)