Q&A about the site for serious players and enthusiasts of poker
revisions = 'site://posts/' + CAST(p.Id AS varchar)+'/revisions',
WHEN (p.ParentId IS NULL)
WHEN 1 THEN 'Initial Title'
WHEN 2 THEN 'Initial Body'
WHEN 3 THEN 'Initial Tags'
WHEN 4 THEN 'Edit Title'
WHEN 5 THEN 'Edit Body'
WHEN 6 THEN 'Edit Tags'
WHEN 7 THEN 'Initial Title'
WHEN 8 THEN 'Initial Body'
WHEN 9 THEN 'Initial Tags'
WHEN 10 THEN 'Post Closed'
WHEN 11 THEN 'Post Reopened'
WHEN 12 THEN 'Post Deleted'
WHEN 13 THEN 'Post Undeleted'
WHEN 14 THEN 'Post Locked'
WHEN 15 THEN 'Post Unlocked'
WHEN 16 THEN 'Community Owned'
WHEN 17 THEN 'Post Migrated'
WHEN 18 THEN 'Question Merged'
WHEN 19 THEN 'Question Protected'
WHEN 20 THEN 'Question Unprotected'
WHEN 21 THEN 'Post Disassociated'
WHEN 22 THEN 'Question Unmerged'
WHEN 24 THEN 'Suggested Edit Applied'
WHEN 25 THEN 'Post Tweeted'
WHEN 31 THEN 'Comments moved to chat'
WHEN 33 THEN 'Post notice added'
WHEN 34 THEN 'Post notice removed'
WHEN 35 THEN 'Post migrated away'
WHEN 36 THEN 'Post migrated here'
WHEN 37 THEN 'Post merge source'
WHEN 38 THEN 'Post merge destination'
WHEN 50 THEN 'Bumped by Community User'
WHEN 52 THEN 'Question became HNQ'
WHEN 53 THEN 'Question removed from HNQ by a mod'
ph.UserId AS [User Link],
FROM PostHistory ph INNER JOIN Posts p ON p.Id=ph.PostId
WHERE coalesce(p.parentid, p.id)=##qid?85211##
---either the post or the parent has this id
AND (ph.PostHistoryTypeId in (1,2,3,4,5,6,7,8,9))
ORDER BY ph.Id DESC