Q's with no A's >= 0 after three months

0

Please login or register to vote for this query.

(click on this box to dismiss)

Finds number of questions that have no accepted answer and no answers with a score >= 0 after three months

Stack Overflow

Q&A for programmers

-- Q's with no A's >= 0 after three months
-- Finds number of questions that have no accepted answer and no answers with a score >= 0 after three months

select count(*) from posts as q
where PostTypeId=1
AND Score < 1
AND CreationDate < DATEADD(MONTH, -3, GETDATE())
AND ClosedDate is null
and AcceptedAnswerId is null
AND NOT EXISTS (
    select * from posts as a where PostTypeId=2 and ParentId=q.id and Score>=0
)

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached