Count Reopened Questions

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

SELECT COUNT(*)
FROM Posts p
WHERE 
    p.PostTypeId = 1 -- questions only
    AND EXISTS (
      SELECT * FROM PostHistory ph
      WHERE ph.postId = p.Id
        AND ph.PostHistoryTypeId = 11 -- reopened
        )

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results