How many comments do I have for each score.
Q&A for professional and enthusiast programmers
Score / 10 as bucket,
ROUND(CUME_DIST () OVER (ORDER BY Score / 10 DESC) * 100.0, 2) AS CumeDist,
ROUND(PERCENT_RANK() OVER (ORDER BY Score / 10 DESC) * 100.0, 2) AS PctRank
GROUP BY Score / 10
ORDER BY bucket desc