Wrong result order from ORDER BY

Hello,

We have a query of

SELECT a FROM TABLE t GROUP BY a ORDER BY a DESC

The order-by result is not sorted in reverse. Why “Datad Br…” comes before “DUBAI …”?

image

It was tested with Dremio 4.1.8

Hello @dli16,

a has a larger Unicode point value than U so the ordering is correct here.

Thank you @ben,

If I do

SELECT a FROM TABLE t GROUP BY a ORDER BY LOWER(a) DESC

It doesn’t give a correct order either
image