Who are answering the same questions as me?

0

Please login or register to vote for this query.

(click on this box to dismiss)

List those users that have answered at least two questions which I have also answered

Open Source Meta

Q&A about the site for people organizing, marketing or licensing open source development projects

-- Who are answering the same questions as me?
-- List those users that have answered at least two questions which I have also answered

declare @MyUserId int = ##MyUserId##; -- 176569;

select count(distinct myAnswer.ParentId) as QuestionCount,
 otherAnswer.OwnerUserId as [User Link],
 otherUser.DisplayName as otherUserDisplayName
from Posts as myAnswer, Posts as otherAnswer, Users as otherUser
where otherAnswer.OwnerUserId != @MyUserId 
 and myAnswer.ownerUserId = @MyUserId   
 and myAnswer.ParentId = otherAnswer.ParentId
 and otherAnswer.postTypeId = 2
 and myAnswer.postTypeId = 2
 and otherUser.id = otherAnswer.OwnerUserId
group by otherAnswer.OwnerUserId, otherUser.DisplayName
having count(distinct myAnswer.ParentId) > 1
order by QuestionCount desc 

Enter Parameters

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