QUERY PLAN
Sort (cost=80.70..80.70 rows=1 width=194)
Sort Key: serial_no DESC
-> Seq Scan on tbl_sales_contracts (cost=0.00..80.69 rows=1 width=194)
Filter: ((created_at >= '2025-08-21 00:00:00+08'::timestamp with time zone) AND (created_at <= '2025-08-21 23:59:59+08'::timestamp with time zone) AND ((serial_no)::text ~~* '%2025-08-21-%'::text) AND (length((serial_no)::text) = 14))