Posts where last event was CW-ification and it was done by the OP

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

SELECT
 ph.PostId AS [Post Link],
 revisions = 'site://posts/' + CAST(ph.PostId AS varchar)+'/revisions'
FROM PostHistory ph INNER JOIN Posts p ON p.Id=ph.PostId
 WHERE (ph.PostHistoryTypeId=16)
---16 = CW
AND (ph.UserId=p.OwnerUserId)
---turned to CW by a user other than the OP
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

Enter Parameters

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