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