Top tags by closed question ratio

0

Please login or register to vote for this query.

(click on this box to dismiss)

Server Fault

Q&A for system and network administrators

SELECT --TOP 20 
    TagName,
    COUNT(*) / COUNT(closedTag.TagId)
FROM Tags
    INNER JOIN PostTags ON PostTags.TagId = Tags.Id
    INNER JOIN Posts ON PostTags.PostId = Posts.Id
    LEFT JOIN PostTags closedTag ON PostTags.TagId = closedTag.TagId
WHERE PostTypeId = 1 and ClosedDate is not null
GROUP BY TagName
ORDER BY COUNT(*) / COUNT(closedTag.TagId) DESC

Enter Parameters

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