QUERY PLAN
Aggregate (cost=68.43..68.44 rows=1 width=32)
-> Sort (cost=68.26..68.29 rows=11 width=1018)
Sort Key: b.is_delete, b.sort
-> GroupAggregate (cost=67.85..68.07 rows=11 width=1018)
Group Key: b.id
-> Sort (cost=67.85..67.88 rows=11 width=41)
Sort Key: b.id
-> Hash Left Join (cost=66.51..67.66 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=66.42..66.42 rows=7 width=36)
-> Subquery Scan on l (cost=66.27..66.42 rows=7 width=36)
-> HashAggregate (cost=66.27..66.36 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=1261 width=10)
Filter: (settle_at <= '2026-01-01 00:00:00+08'::timestamp with time zone)