Closed, no answers and no activity for a week


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select top 300 q.Id as [Post Link]

from Posts q
join PostHistory ph on ph.PostId=q.Id

--- closed at least deadline days ago
where ClosedDate < getdate()-##deadline##

-- not closed as a duplicate
and PostHistoryTypeId=10
and Comment<>'1'

-- no answers
and isnull(AnswerCount,0)=0

-- not locked
and isnull((select top 1 PostHistoryTypeId from PostHistory
where PostId=q.Id and PostHistoryTypeId in (14,15,35) order by CreationDate desc),0) not in (14,35)

-- no activity in the last week
and not exists (select 1 from PostHistory
  where PostId=q.Id and CreationDate > getdate()-7)
order by q.CreationDate desc

Enter Parameters

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