Unanswered questions by year


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 year(q.CreationDate) year,
sum(iif(a.Id is null, 1, 0)) unanswered,
count(distinct q.Id) asked
from Posts q
     right outer join Posts a 
          on a.ParentId = q.Id
         where a.OwnerUserId <> q.OwnerUserId
and q.PostTypeId = 1
      and a.CreationDate < q.CreationDate + 3
group by year(q.CreationDate)
order by year(q.CreationDate)

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results