Q&A about the Stack Exchange Network
select TagName, count(*) N, round(100.0*count(ClosedDate)/count(*), 0) "% closed", round(100.0*count(case when Score < 0 then 1 end)/count(*), 0) "% downvoted", round(100.0*count(case when Score < 0 or ClosedDate is not null then 1 end) /count(*), 0) "% both", avg(1.0*Score) avg_score from Posts p join PostTags on p.Id = PostId join Tags t on t.Id = TagId where PostTypeId = 1 -- Not absolutely required since we join to PostTags group by TagName having count(*) > 50 order by avg(1.0*Score)