Number of posts with each kind of history

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

/*
   1. Initial Title - The first title a question is asked with.
   2. Initial Body - The first raw body text a post is submitted with.
   3. Initial Tags - The first tags a question is asked with.
   4. Edit Title - A question's title has been changed.
   5. Edit Body - A post's body has been changed, the raw text is stored here as markdown.
   6. Edit Tags - A question's tags have been changed.
   7. Rollback Title - A question's title has reverted to a previous version.
   8. Rollback Body - A post's body has reverted to a previous version - the raw text is stored here.
   9. Rollback Tags - A question's tags have reverted to a previous version.
  10. Post Closed - A post was voted to be closed.
  11. Post Reopened - A post was voted to be reopened.
  12. Post Deleted - A post was voted to be removed.
  13. Post Undeleted - A post was voted to be restored.
  14. Post Locked - A post was locked by a moderator.
  15. Post Unlocked - A post was unlocked by a moderator.
  16. Community Owned - A post has become community owned.
  17. Post Migrated - A post was migrated.
  18. Question Merged - A question has had another, deleted question merged into itself.
  19. Question Protected - A question was protected by a moderator
  20. Question Unprotected - A question was unprotected by a moderator
  21. Post Disassociated - An admin removes the OwnerUserId from a post
  22. Question Unmerged - A previously merged question has had its answers and votes restored.
*/

SELECT PostHistoryTypeId, COUNT(PostId)
FROM PostHistory
GROUP BY PostHistoryTypeId
ORDER BY PostHistoryTypeId

Enter Parameters

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