Only column names which are also specified as select column can be specified in the ORDER clause of a QUERY statement with DISTINCT specification.
If column numbers are specified, it must be ensured that this number is not greater than the number of specified output columns.
The number of output columns may have decreased in case of a SELECT * as a result of an ALTER TABLE statement with DROP definition.
Do not use the DISTINCT specification or specify the column of the ORDER clause in a select column.
Correct the number in the ORDER clause accordingly.