Posts which were edited while they were deleted

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

SELECT
  DISTINCT ph1.PostId AS [Post Link],
  concat('site://posts/',ph1.PostId,'/revisions') AS [Revisions Link],
  ph2.CreationDate AS Deleted, ph1.CreationDate AS Edited,
  ph1.UserId AS [User Link], ph1.UserDisplayName
FROM PostHistory ph1 INNER JOIN PostHistory ph2 ON ph1.PostId=ph2.PostId
  INNER JOIN PostHistory ph3 ON ph1.PostId=ph3.PostID
WHERE (ph2.PostHistoryTypeId=12) AND (ph3.PostHistoryTypeId=13) AND (ph1.PostHistoryTypeId in (4,5,6))
  AND (ph1.CreationDate>ph2.CreationDate) AND (ph1.CreationDate<ph3.CreationDate)
ORDER BY ph1.PostId DESC

Enter Parameters

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