How many comments do I have for each score.
Q&A for professional and enthusiast programmers
LOG(Score, 10) AS score_log10,
ROUND(COUNT(1) / t.cnt * 1000.0, 3) as permille
JOIN (SELECT CAST(COUNT(1) AS FLOAT) AS cnt FROM comments) t
WHERE Score > 0
GROUP BY LOG(Score, 10), t.cnt