QUERY PLAN
Aggregate (cost=36.47..36.48 rows=1 width=32)
-> Nested Loop Left Join (cost=34.04..36.45 rows=1 width=72)
Join Filter: (t.id = b.id)
-> Nested Loop Left Join (cost=34.04..35.30 rows=1 width=68)
Join Filter: (t_1.erp_bank_id = b.id)
-> Seq Scan on tbl_erp_banks b (cost=0.00..1.07 rows=1 width=4)
Filter: (erp_account_caption_id = 103)
-> HashAggregate (cost=34.04..34.11 rows=5 width=68)
Group Key: t_1.erp_bank_id
-> Seq Scan on tbl_erp_bank_amount_change_logs t_1 (cost=0.00..28.02 rows=802 width=15)
Filter: (settle_at <= '2025-12-31 23:59:59+08'::timestamp with time zone)
-> Seq Scan on tbl_erp_banks t (cost=0.00..1.07 rows=6 width=12)
Filter: (created_at <= '2025-12-31 23:59:59+08'::timestamp with time zone)