QUERY PLAN
Sort (cost=108.60..108.60 rows=1 width=458)
Sort Key: serial_no DESC
-> Seq Scan on tbl_erp_sales_orders (cost=0.00..108.59 rows=1 width=458)
Filter: ((created_at >= '2026-06-05 00:00:00+08'::timestamp with time zone) AND (created_at <= '2026-06-05 23:59:59+08'::timestamp with time zone) AND ((serial_no)::text ~~* '%XSDD-20260605-%'::text) AND (length((serial_no)::text) = 19))