Most Upvoted Answers

0

Please login or register to vote for this query.

(click on this box to dismiss)

The top 20 answers with the most up-votes (ignores down-votes)

Academia

Q&A for academics and those enrolled in higher education

/*select max(votes) as maxv, DATEDIFF(month, getdate(), p.CreationDate) as mon from (*/
select count(v.postid) as votes, v.postid postid
from votes v 
inner join posts p on p.id=v.postid
where PostTypeId = 2 and VoteTypeId=2
group by v.postid
/*) c
inner join posts p on c.id=p.id
group by DATEDIFF(month, getdate(), p.CreationDate)
order by DATEDIFF(month, getdate(), p.CreationDate)
*/
order by votes desc

Enter Parameters

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