select top 10000 p.id as [Post Link] , count(*) [# favour...

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

select top 10000
       p.id as [Post Link]
       , count(*) [# favourite]
from posts p
inner join votes v on v.postid = p.id
where v.votetypeid = 5 -- favorite
group by p.id
order by count(*)  desc

Enter Parameters

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