QUERY PLAN
Sort (cost=7.88..7.88 rows=1 width=223)
Sort Key: serial_no DESC
-> Seq Scan on tbl_erp_sales_gifts (cost=0.00..7.87 rows=1 width=223)
Filter: ((created_at >= '2026-07-06 00:00:00+08'::timestamp with time zone) AND (created_at <= '2026-07-06 23:59:59+08'::timestamp with time zone) AND ((serial_no)::text ~~* '%ZSD-20260706-%'::text) AND (length((serial_no)::text) = 18))