How to find all answers that a certain person has answered me?

0

Please login or register to vote for this query.

(click on this box to dismiss)

http://meta.stackoverflow.com/questions/340245/how-to-find-all-answers-that-a-certain-person-has-answered-me

Stack Overflow

Q&A for professional and enthusiast programmers

;with answers as 
(select a.id 
     , a.owneruserid 
from posts q 
inner join posts a on q.id = a.parentid
where q.owneruserid = ##userid:int?3577745##
)

select a.id as [Post Link]
     , a.owneruserid as [User Link]
     , (select count(*) 
        from answers ans 
        where a.owneruserid = ans.owneruserid) as [# tot answers]
from answers a
order by 3 desc , 2

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results