Lists all currently locked posts, most recent first.
Q&A about the site for serious players and enthusiasts of poker
SELECT p.Id as [Post Link] FROM Posts p INNER JOIN PostHistory h ON h.PostId = p.ID WHERE h.PostHistoryTypeId IN (14, 15) -- locked, unlocked GROUP BY p.Id HAVING SUM(CASE WHEN h.PostHistoryTypeId = 14 THEN 1 ELSE -1 END) > 0 -- locked more often than unlocked