Search for answers by user to questions closed as duplicates

1

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS Meta

Q&A about the site for administrators, end users, developers and designers for Craft CMS

select  answers.Score, 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 to main site
loading Hold tight while we fetch your results