Answer and Hammer by User

0

Please login or register to vote for this query.

(click on this box to dismiss)

Anime and Manga

Q&A for anime and manga fans

-- UserId: User ID
DECLARE @UserId int = ##UserId:int##;

SELECT DISTINCT
  answers.Id as [Post Link], v.VoteTypeId
FROM PostsWithDeleted as questions
INNER JOIN PostsWithDeleted as answers ON answers.ParentId = questions.Id
LEFT OUTER JOIN PostLinks pl on pl.PostId = questions.Id 
LEFT OUTER JOIN Votes v on v.PostId = questions.Id

WHERE
  answers.OwnerUserId = @UserId 
  AND questions.ClosedDate IS NOT NULL
  AND pl.LinkTypeId = 3
  AND v.UserId = @UserId -- answers.OwnerUserId
ORDER BY
answers.Id DESC
;

Enter Parameters

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