• Very good question, thank you Mr. Ocean!

    I didn't know about this behaviour, but giving it some thought before answering made me realize the right answer.

    Also, thank you Hugo for the further explanation (as usual). I had figured out the impossibility of ordering by a column not included in the select clause with distinct, but I didn't know the server included the ordered columns in the select list (logically, at least). I also didn't know ANSI SQL required ordered columns to be in the select list.