For example, this doesn't work,
SELECT a.score, a.r as Rank FROM
(SELECT score, dense_rank() over (order by Score desc) as r
FROM Scores) a
ORDER BY a.r;
That is because Rank is also a function. I tried to replace Rank with [Rank] but that still doesn't work. So, what is the solution?