Order by does not work correctly

The order of columns listed to order by is not maintained.