* no ambiguous ORDER BY * mean: order S.fieldname, and after fill the fieldName SELECT S.fieldname AS fieldName FROM sourceTable S ORDER BY S.fieldname * mean: fill the resultfieldname and after order resultfieldname SELECT S.fieldname AS resultfieldname FROM sourceTable S ORDER BY resultfieldname * then, for having one coherente grammatical, the ambiguous have to be solved with: * mean: fill the fieldName and after order fieldname SELECT S.fieldname AS fieldName FROM sourceTable S ORDER BY fieldName * mean: fill the fieldName and after order fieldname SELECT S.fieldname AS fieldName FROM sourceTable S ORDER BY 1Add DISTINCT don't change the mean.