QUERY PLAN
Sort (cost=3.00..3.00 rows=1 width=320)
Sort Key: serial_no DESC
-> Seq Scan on tbl_erp_other_collect_tickets (cost=0.00..2.99 rows=1 width=320)
Filter: ((created_at >= '2026-06-11 00:00:00+08'::timestamp with time zone) AND (created_at <= '2026-06-11 23:59:59+08'::timestamp with time zone) AND ((serial_no)::text ~~* '%QTYSD-20260611-%'::text) AND (length((serial_no)::text) = 20))