Absolute Post Closed count

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT TOP 20 
    TagName,
    COUNT(*) AS "Closes" 
FROM Tags
    INNER JOIN PostTags ON PostTags.TagId = Tags.id
    INNER JOIN Posts ON Posts.Id = PostTags.PostId
    Inner Join PostHistory PH On Posts.Id = PH.PostId
    Inner Join PostHistoryTypes HT On HT.Id = PH.PostHistoryTypeId
--    Inner Join PostFeedback PF On Posts.Id = PF.PostId
--    Inner Join VoteTypes VT On VT.Id = PF.VoteTypeId
Where
    Posts.PostTypeId=1
    AND HT.Name='Post Closed'
--    AND PF.VoteTypeId=6
Group By TagName,HT.Name
Order By 2 Desc

Enter Parameters

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