QUERY PLAN
HashAggregate (cost=6.51..6.84 rows=22 width=68)
Group Key: i.ledger_account_caption_id
-> Hash Join (cost=2.23..5.67 rows=112 width=12)
Hash Cond: (i.ledger_ticket_id = t.id)
-> Seq Scan on tbl_ledger_ticket_items i (cost=0.00..3.12 rows=112 width=16)
-> Hash (cost=1.76..1.76 rows=38 width=4)
-> Seq Scan on tbl_ledger_tickets t (cost=0.00..1.76 rows=38 width=4)
Filter: ((ticket_date >= '2026-05-01'::date) AND (ticket_date <= '2026-05-31'::date) AND (ledger_id = 1) AND (status = 1))