select u.id U,p.PostTypeid, count(case when v.voteTypeid=...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Audio-Video Production Meta

Q&A for engineers, producers, editors, and enthusiasts spanning the fields of audio, video, and media creation

select u.id U,p.PostTypeid,
count(case when v.voteTypeid=2 then 1 else 0 end) UP, 
count(case when v.voteTypeid=3 then 1 else 0 end) Down
from posts p
join users u on p.OwnerUserId = u.Id 
join votes v on p.id=v.Postid
where p.creationDate between '2010-03-11' and '2011-03-11'
and v.voteTypeid in (2,3)
group by u.id,p.PostTypeid
order by UP desc

Enter Parameters

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