[Archaeologist] Posts inactive for over 6 months and with which I did not interact

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

-- List questions inactive for over 6 months
-- Archaeologist Badge: "Edited 100 posts that were inactive for 6 months"

SELECT TOP(50) 
  --'stackoverflow.com/questions/'+p.Id+'/slug' AS URL,
  p.Id, p.Id as [Post Link], p.Score, p.Tags, p.CreationDate
FROM 
  Posts p
WHERE 
  p.LastEditDate < DATEADD(month, -6, p.LastActivityDate) AND
  p.ParentId IS NULL AND
  NOT EXISTS (
    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)
       OR c.OwnerUserId = ##UserId##
    ) 
  ) 

ORDER BY -- p.Score DESC
p.CreationDate DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results