Q&A for professional and enthusiast programmers
select sum(case when p.commentcount = 0 then 1 else 0 end) nocomment , sum(case when p.commentcount > 0 then 1 else 0 end) comments , sum(case when p.commentcount = 0 and score < 0 then 1 else 0 end) [low score] , count(*) [downvoted posts] , sum(case when p.commentcount = 0 then 1 else 0 end) / convert(decimal, count(*)) * 100 [% no comment] , sum(case when p.commentcount > 0 then 1 else 0 end) / convert(decimal, count(*)) * 100 [% comments] , sum(case when p.commentcount = 0 and score < 0 then 1 else 0 end) / convert(decimal, count(*)) * 100 [% low score] from posts p where p.id in (select postid from votes where votetypeid = 3)