Distribution of votes by type


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 COUNT(VX.id), VX.YR_WK
from VoteTypes VT
join (select V.VoteTypeId As VoteTypeId, 
(datepart(yy, V.creationdate) + (datepart(wk, V.creationdate)-1) / 52.0) as YR_WK, V.ID as ID
from Votes V) VX
on VX.VoteTypeId = VT.id AND VT.Name='AcceptedByOriginator'
group by VX.YR_WK
order by VX.YR_WK

Enter Parameters

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