Questions favourited and answered by the same user

0

Please login or register to vote for this query.

(click on this box to dismiss)

Poker Meta

Q&A about the site for serious players and enthusiasts of poker

declare @UserId int = ##UserId##

select Id as [Post Link]
from Posts question
where exists(select * from Votes vote
          where vote.UserId = @UserId
          and vote.PostId = question.Id
          and VoteTypeId = 5) --Favourite
      and
      exists(select * from Posts answer
          where answer.OwnerUserId = @UserId
          and answer.ParentId = question.Id 
          and PostTypeId = 2) --Answer

Enter Parameters

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