QUERY PLAN
Aggregate (cost=70.72..70.73 rows=1 width=32)
-> Sort (cost=70.55..70.58 rows=11 width=1018)
Sort Key: b.is_delete, b.sort
-> GroupAggregate (cost=70.14..70.36 rows=11 width=1018)
Group Key: b.id
-> Sort (cost=70.14..70.17 rows=11 width=41)
Sort Key: b.id
-> Hash Left Join (cost=68.80..69.95 rows=11 width=41)
Hash Cond: (b.id = l.erp_bank_id)
-> Seq Scan on tbl_erp_banks b (cost=0.00..1.11 rows=11 width=9)
-> Hash (cost=68.71..68.71 rows=7 width=36)
-> Subquery Scan on l (cost=68.56..68.71 rows=7 width=36)
-> HashAggregate (cost=68.56..68.64 rows=7 width=68)
Group Key: t.erp_bank_id
-> Seq Scan on tbl_erp_bank_amount_change_logs t (cost=0.00..59.96 rows=1719 width=10)
Filter: (settle_at <= '2026-05-01 00:00:00+08'::timestamp with time zone)