Q&A about the site for programming puzzle enthusiasts and code golfers
SELECT p.Id AS PostId, p.CreationDate AS PostCreationDate, lh.CreationDate AS LockDate FROM Posts p JOIN PostHistory lh ON p.Id = lh.PostId WHERE lh.PostHistoryTypeId = 14 -- 14 is the PostHistoryTypeId for "Lock" ORDER BY lh.CreationDate DESC