Forum style questions - multiple self answers from asker

0

Please login or register to vote for this query.

(click on this box to dismiss)

Multiple self answers from asker, sorted by the number of times self-answered, and filtered to exclude questions prior to Jan 1, 2010. (To avoid questions from 2008 with historical locks.)

Stack Overflow

Q&A for professional and enthusiast programmers

select TOP 1000 question.Id as [Post Link], 
       question.CreationDate,
       count(selfAnswer.Id) as [Count]
from posts as question
    inner join posts as selfAnswer
        on  selfAnswer.owneruserid = question.owneruserid
        and selfAnswer.parentid = question.id
        inner join Users as users on users.Id = question.owneruserid
where question.posttypeid = 1
and selfAnswer.posttypeid = 2
and question.ClosedDate IS NULL
group by question.Id, 
         question.CreationDate
having count(distinct selfAnswer.id) > 1
order by 
        [Count] DESC,
        question.CreationDate DESC

Enter Parameters

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