Search for answers by user to questions closed as duplicates

3

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Ubuntu

Q&A for Ubuntu users and developers

select  question.Id as [Post Link], answers.CreationDate, 
answers.Id as [Post Link], answers.OwnerUserId as [User Link], cr.Name
-- find the answers for the user
from Posts as answers
inner join Posts as question
on question.Id = answers.ParentId
-- query the question's post history
inner join PostHistory ph
on ph.PostId = question.Id
-- get the close reason for viewability
inner join CloseReasonTypes cr
on cr.Id = ph.Comment

where 
answers.OwnerUserId = '##UserId##'
and answers.PostTypeId =2 
and question.ClosedDate is not null
-- check question is closed
and ph.PostHistoryTypeId = 10
-- check if closed as duplicate
and (ph.Comment like '1'
or ph.Comment like '101')



order by answers.CreationDate desc

Enter Parameters

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