Find the users who have marked my questions as favorites.
Q&A for professional and enthusiast programmers
-- Reverse Fan Finder
-- Find the users who I have marked their questions as favorites.
declare @UserId int = ##UserId##
select top 200
p.id as [Post],
p.owneruserid as [User Link],
count(*) as FavoriteCount
from votes v
join posts p on p.id = v.postid
where v.userid = @userid
and v.votetypeid = 5
group by p.owneruserid , p.id
order by favoritecount desc