Q&A for people looking to bypass life's everyday problems with simple tricks
SELECT p.Score, h.PostId AS [Post Link], CAST(h.CreationDate AS Date) AS [Locked Date] FROM PostNotices h INNER JOIN Posts p ON p.ID = h.PostId INNER JOIN PostNotices n ON p.ID = n.PostId WHERE h.Id IN ( SELECT MAX(Id) FROM PostHistory GROUP BY PostId ) AND h.PostNoticeTypeId = 9001 ORDER BY h.CreationDate