Due to logical query processing order, alias can be used in order by.
SELECT DisplayName, JoinDate as jd, Reputation as rep
FROM Users
ORDER BY jd, rep
And can use relative order of the columns in the select statement .Consider the same example as above and instead of using alias use the relat...