test test test 2

0

Please login or register to vote for this query.

(click on this box to dismiss)

Science Fiction and Fantasy Meta

Q&A about the site for science fiction and fantasy enthusiasts

SELECT TOP(##num?100##)
  ph.CreationDate,
  ph.PostHistoryTypeId,
  ph2.CreationDate,
  ph2.PostHistoryTypeId,
  DATEDIFF(hour, ph.CreationDate, ph2.CreationDate) AS Hours,
  DATEDIFF(minute, ph.CreationDate, ph2.CreationDate) AS Minutes,
  DATEDIFF(second, ph.CreationDate, ph2.CreationDate) AS Seconds,
  ph.UserId AS [User Link],
  p.Id AS [Post Link],
  concat('site://posts/',
          p.Id,
          '/revisions'
          ) [Revisions Link]
FROM PostHistory ph INNER JOIN Posts p
  ON ph.PostId=p.Id  AND ph.PostHistoryTypeId=52 AND p.PostTypeId=1
  INNER JOIN PostHistory ph2 
  ON ph2.PostId=p.Id  AND ph2.PostHistoryTypeId=53 AND p.PostTypeId=1
ORDER BY ph.CreationDate DESC

Enter Parameters

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