Most upvoted questions in last year

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 50 Posts.Id [Post Link], COUNT(Votes.Id) FROM Posts
JOIN Votes ON Posts.Id = Votes.PostId
WHERE Posts.PostTypeId = 1
AND Votes.VoteTypeId = 2
AND Votes.CreationDate > DATEADD(year,-1,GETDATE())
GROUP BY Posts.Id, Votes.PostId
ORDER BY COUNT(Votes.Id) DESC

Enter Parameters

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