QUERY PLAN
Limit (cost=3.14..3.23 rows=38 width=59)
-> Sort (cost=3.14..3.23 rows=38 width=59)
Sort Key: ticket_date, ticket_word, serial_no, id
-> HashAggregate (cost=1.76..2.14 rows=38 width=59)
Group Key: id
-> Seq Scan on tbl_ledger_tickets t (cost=0.00..1.67 rows=38 width=59)
Filter: ((ticket_date >= '2026-01-01'::date) AND (ticket_date <= '2026-12-31'::date) AND (ledger_id = 1))