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

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

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

SELECT TOP(200) 
  --'stackoverflow.com/questions/'+p.Id+'/slug' AS URL,
  p.Id as [Post Link], p.Title, p.Score FROM Posts p
WHERE p.LastEditDate < DATEADD(month, -6, p.LastActivityDate) 
  AND p.ParentId IS NULL 
  AND p.Score > -1
  AND p.Score < 4
  AND (
    CHARINDEX('javascript', p.Tags) > 0 
    OR CHARINDEX('c#', p.Tags) > 0 
    OR CHARINDEX('linq', p.Tags) > 0 
    OR CHARINDEX('kendo-ui', p.Tags) > 0 
    OR CHARINDEX('asp.net', p.Tags) > 0 
    OR CHARINDEX('razor', p.Tags) > 0 
    OR CHARINDEX('ado.net', p.Tags) > 0 
    OR CHARINDEX('kendo-grid', p.Tags) > 0 
  )
  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)
       AND c.Score >= 0
    )
  )
ORDER BY p.LastActivityDate desc

Enter Parameters

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