Posts inactive for over 6 months: Useful for Archaeologist badge progress


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

-- How close are you to getting the Archaeologist badge?
--  "Edited 100 posts that were inactive for 6 months"

SELECT TOP(5000) p.Id, p.Title, p.Score FROM Posts p
WHERE p.ParentId IS NULL -- Questions only
 AND (
   p.LastEditDate < DATEADD(month, -6, CURRENT_TIMESTAMP) AND
   p.LastActivityDate < DATEADD(month, -6, CURRENT_TIMESTAMP)
     SELECT * FROM Posts c
     WHERE c.ParentId = p.Id
      AND (
        c.LastEditDate > DATEADD(month, -6, CURRENT_TIMESTAMP) OR
        c.LastActivityDate > DATEADD(month, -6, CURRENT_TIMESTAMP)
ORDER BY p.Score asc

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results