Who Favorited My Question?

0

Please login or register to vote for this query.

(click on this box to dismiss)

Show users who marked a as "favorites", and which posts they marked...

Stack Overflow

Q&A for professional and enthusiast programmers

-- Who Favorited My Question?
-- Show users who marked a as "favorites", and which posts they marked...

--DECLARE @PostID int = #PostID##

--select votes.userid as [User Link], posts.id as [Post Link] 
--from votes 
--  join posts on posts.id = votes.postid 
--where votetypeid=5 and posts.id=@PostID

--select Id, PostId as [Post Link] from votes where UserId = ##UserId##


select Votes.*
from votes
  join posts on posts.id = votes.postid 
where
  votetypeid=5 and
  posts.PostTypeId = 1 and
  posts.OwnerUserId = ##UserId##

Enter Parameters

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