This issue is caused by the case of the ID.
During the execution of a DWS SQL script, the system uses lowercase letters by default. If a field is in upper case, add "".
Example: select * from table1 order by "ID";
select * from table order by "ID";