My Edit History

0

Please login or register to vote for this query.

(click on this box to dismiss)

Biology Meta

Q&A about the site for biology researchers, academics, and students

-- My edit history
-- Shows edits to posts I did not originally create

SELECT 
  CASE 
    WHEN (P.PostTypeId = 1) THEN P.Title 
    ELSE (SELECT TOP 1 Title FROM Posts WHERE Posts.Id = P.ParentId)
  END AS [Question Title], 
  CASE 
    WHEN (P.PostTypeId = 1) THEN 'Question' 
    ELSE 'Answer' 
  END AS [Edit To], 
  PH.CreationDate AS [Edit Date],
  'site://questions/' + CONVERT(VARCHAR, P.Id)+'|Post #' + CONVERT(VARCHAR, P.Id) AS [Link]
FROM PostHistory AS PH, Posts AS P
WHERE 
  P.Id = PH.PostId AND PH.UserId = ##UserId## AND P.OwnerUserId <> ##UserId##
ORDER BY PH.CreationDate ASC

Enter Parameters

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