Number of edits per post

0

Please login or register to vote for this query.

(click on this box to dismiss)

Distribution of the number of edits per post

Engineering

Q&A for professionals and students of engineering

SELECT TOP 100
  p.Id AS [Id],
  Min(p.PostTypeId) AS [PostTypeId],
  Count(CASE ph.PostHistoryTypeId WHEN 4 THEN 1 END) AS [TitleEditCount],
  Count(CASE ph.PostHistoryTypeId WHEN 5 THEN 1 END) AS [BodyEditCount],
  Count(CASE ph.PostHistoryTypeId WHEN 6 THEN 1 END) AS [RetagCount],
  Count(*) AS [EditCount]
FROM PostHistory ph, Posts p
WHERE ph.PostId = p.Id
  AND (p.PostTypeId = 1 OR p.PostTypeId = 2)
  AND (ph.PostHistoryTypeId = 4 OR ph.PostHistoryTypeId = 5 OR ph.PostHistoryTypeId = 6)
GROUP BY p.Id

Enter Parameters

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