Q&A for ebook publishers and readers
SELECT count (*) -- 'http://stackoverflow.com/posts/' + Convert(NVarchar(10), edit.PostId) + '/revisions|Revision History' AS [Revision Link] -- edit.PostId as [Post Link] ---count (distinct prev.RevisionGUID) as Revision FROM PostHistory edit WHERE userId = ##UserId:int## and PostHistoryTypeId in (2, 5)