Currently Historically Locked Posts

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT 
  CONCAT('site://q/', pn.PostId, '|', CASE 
    WHEN pwd.DeletionDate IS NULL 
    THEN CASE
      WHEN pwd.PostTypeId = 1
      THEN pwd.Title
      ELSE parent.Title
      END
    ELSE '[deleted]' 
    END) AS [Link],
  pwd.Score,
  pwd.ViewCount AS [Views],
  pwd.CreationDate AS [Post Date],
  pn.CreationDate AS [Lock Date (Most Recent)]
FROM PostNotices pn
JOIN PostsWithDeleted pwd ON pwd.Id = pn.PostId
LEFT JOIN Posts parent ON parent.Id = pwd.ParentId
WHERE pn.PostNoticeTypeId = 22 -- Id for Historical Locks
  AND pn.DeletionDate IS NULL
ORDER BY pwd.CreationDate

Enter Parameters

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