Which users have the most favourites?

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

-- Which users have the most favourites?

select
 count(v.Id) as UserFaves,
 u.Reputation
from Users u
inner Join Votes v on v.UserId = u.Id and v.VoteTypeId = 5
group by u.Id, u.Reputation
order by UserFaves desc

Enter Parameters

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