My Favourites Count

2

Please login or register to vote for this query.

(click on this box to dismiss)

Count of favorites that user has created on Stackoverflow. Enter the stackoverflow userid to see that users favorites count...

Amateur Radio

Q&A for amateur radio enthusiasts

declare @userid int;
set @userid = ##UserId##

SELECT count(*) as [Favorites Count]

FROM Votes, Posts

WHERE
     (Votes.PostId=Posts.Id) AND
     (Votes.VoteTypeId = 5) AND
     (Votes.UserId=@userid)
     
Select DisplayName, Id
from Users 
where Id = @userid

Enter Parameters

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