Comment Score distribution, permille

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 
  LOG(Score, 10) AS score_log10,
  LOG(COUNT(1) / t.cnt * 1000.0, 10) as permille_log10
FROM comments
CROSS
JOIN (SELECT CAST(COUNT(1) AS FLOAT) AS cnt FROM comments) t
WHERE Score > 0
GROUP BY LOG(Score, 10), t.cnt

Enter Parameters

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