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