Most recent mod action from a given mod


Please login or register to vote for this query.

(click on this box to dismiss)

Linguistics Meta

Q&A about the site for professional linguists and others with an interest in linguistic research and theory

--actions that can only be done by moderators

--14 = Post Locked - post locked by moderator
--15 = Post Unlocked - post unlocked by moderator
--16 = Community Owned - post now community owned
--QUESTION can only be made CW by a moderator (so I look only at question; PostTypeId=1)
--37 = Post merge source
--38 = Post merge destination

;with recent_cte AS
  MAX(ph.Id) AS MaxId
  FROM PostHistory ph INNER JOIN Posts p
  ON ph.PostId=p.Id
  AND ph.PostHistoryTypeId IN (14,15,16,37,38)
  AND p.PostTypeId=1
GROUP BY ph.UserId

SELECT ph.CreationDate, ph.PostHistoryTypeId, ph.UserId AS [User Link], MaxId,  ph.PostId AS [Post Link],   concat('site://posts/',
          ) [Revisions Link]
FROM recent_cte inner JOIN PostHistory ph ON MaxId = ph.Id
ORDER BY ph.CreationDate DESC

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results