Comment Score distribution


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

  LOG(Score, 10) as score_log10,
  COUNT(*) comment_count,
  ROUND(COUNT(*) / LOG(t.cnt, 10) * 100.0, 2) as percentage
FROM comments
  JOIN (SELECT COUNT(1) AS cnt FROM comments) t
WHERE score >= 10
GROUP BY LOG(Score, 10), t.cnt

Enter Parameters

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