How can I find all the self-answers available on Stack Overflow?

1

Please login or register to vote for this query.

(click on this box to dismiss)

https://meta.stackoverflow.com/questions/400772 How popular are self-answers? How often has the answer been split up due to the 30000 character space constraint and because the user has a lot more to talk about? Do self-answers often attract additional answers from other users?

Moderators

Q&A for community managers, administrators, and moderators

;with self_q as
(
select q.id
     , max(len(a.body)) [max len]
     , (select count(*) 
        from posts p
        where p.parentid = q.id
        and p.owneruserid = q.owneruserid) [num_self]
from posts q 
inner join posts a on a.parentid = q.id
where q.owneruserid = a.owneruserid  
and q.posttypeid = 1 
and q.owneruserid is not null
and q.owneruserid > -1
group by q.id, q.owneruserid
)

select count( q.id) [self answer]
     , sum(q.answercount) [# answers]
     , sum(case when q.answercount = 1 then 1 else 0 end) [only OP answered]
     , sum(case when [max len] > 29000 then 1 else 0 end) [large answers]
     , sum(case when [num_self]>1 then 1 else 0 end) [OP more then one answer]
from posts q 
inner join self_q on self_q.id = q.id

Enter Parameters

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