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...

Open Source Meta

Q&A about the site for people organizing, marketing or licensing open source development projects

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 main site
loading Hold tight while we fetch your results