Comment Score cumulative distribution

0

Please login or register to vote for this query.

(click on this box to dismiss)

How many comments do I have for each score.

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT 
  Score / 10 as bucket,
  CUME_DIST () OVER (ORDER BY Score / 10 DESC) AS CumeDist,   
  PERCENT_RANK() OVER (ORDER BY Score / 10 DESC) AS PctRank  
FROM comments
GROUP BY Score / 10
ORDER BY bucket desc

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results