Posts flagged as "locked"

0

Please login or register to vote for this query.

(click on this box to dismiss)

Drupal Answers

Q&A for Drupal developers and administrators

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"
    AND lh.CreationDate < '2020-01-01'
ORDER BY
    lh.CreationDate DESC

Enter Parameters

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