Q&A about the site for administrators, end users, developers and designers for Craft CMS
--copy from: http://data.stackexchange.com/serverfault/query/59684/top-tags-by-closed-question-ratio SELECT TOP 100 TagName, COUNT(ClosedPost.Id) / CONVERT(FLOAT,COUNT(*)) AS ClosedRatio, COUNT(*) AS QuestionCount FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON PostTags.PostId = Posts.Id LEFT JOIN Posts ClosedPost ON Posts.Id = ClosedPost.Id AND ClosedPost.ClosedDate != '' WHERE Posts.PostTypeId = 1 GROUP BY TagName ORDER BY COUNT(ClosedPost.Id) / CONVERT(FLOAT,COUNT(*)) DESC