QUERY PLAN
Sort (cost=307.44..307.44 rows=1 width=237)
Sort Key: serial_no DESC
-> Seq Scan on tbl_erp_cash_cost_tickets (cost=0.00..307.43 rows=1 width=237)
Filter: ((created_at >= '2025-08-11 00:00:00+08'::timestamp with time zone) AND (created_at <= '2025-08-11 23:59:59+08'::timestamp with time zone) AND ((serial_no)::text ~~* '%XJFYD-20250811-%'::text) AND (length((serial_no)::text) = 20))