Q&A about the site for people who use Blender to create 3D graphics, animations, or games
SELECT ph.PostId AS [Post Link], revisions = 'site://posts/' + CAST(ph.PostId AS varchar)+'/revisions', p.OwnerUserId AS [User Link], ph.UserId AS [User Link] FROM PostHistory ph INNER JOIN Posts p ON p.Id=ph.PostId WHERE (ph.PostHistoryTypeId=16) ---16 = CW AND ph.Id IN ( SELECT MAX(Id) as last FROM PostHistory GROUP BY PostId ) ---only look at the last event for the given post ORDER BY ph.PostId DESC