Top tags by closed question ratio

0

Please login or register to vote for this query.

(click on this box to dismiss)

Science Fiction and Fantasy Meta

Q&A about the site for science fiction and fantasy enthusiasts

SELECT --TOP 20 
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

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results