The top 20 questions with the most up-votes (ignores down-votes)
Q&A for programming puzzle enthusiasts and code golfers
-- Most Upvoted Questions -- The top 20 questions with the most up-votes (ignores down-votes) select top 20 count(v.postid) as 'Vote count', v.postid AS [Post Link],p.body from votes v inner join posts p on p.id=v.postid where PostTypeId = 1 and VoteTypeId=2 group by v.postid,p.body order by 'Vote count' desc