Self-answered questions that would have been deleted

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

select count(distinct q.id) as Questions
  from posts q
  join posts a
    on q.id = a.parentid
 where q.posttypeid = 1
   and a.posttypeid = 2
   and q.closeddate is null
   and DATEPART(yyyy, q.CreationDate) = 2012
   and a.owneruserid = q.owneruserid
   and a.score <= 0
   and ( ( q.score <= 0
           and q.viewcount <= datediff(dd, q.creationdate, getdate()) * 1.5
           )
         or ( q.score <= -1
             )
          )

Enter Parameters

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