QUERY PLAN
Sort (cost=14.51..14.52 rows=1 width=362)
Sort Key: serial_no DESC
-> Seq Scan on tbl_erp_sales_outbounds (cost=0.00..14.50 rows=1 width=362)
Filter: ((created_at >= '2025-08-08 00:00:00+08'::timestamp with time zone) AND (created_at <= '2025-08-08 23:59:59+08'::timestamp with time zone) AND ((serial_no)::text ~~* '%XSCKD-20250808-%'::text) AND (length((serial_no)::text) = 20))