Up, accept and down votes over time


Please login or register to vote for this query.

(click on this box to dismiss)

... to balance the requests that ask to do something about down votes

Stack Overflow

Q&A for professional and enthusiast programmers

select eomonth(creationdate)
    , sum(case when votetypeid = 1 then 1 else 0 end)  accept
    , sum(case when votetypeid = 2 then 1 else 0 end)  up
    , sum(case when votetypeid = 3 then 1 else 0 end)  down
from votes
where votetypeid in (1,2,3)
and creationdate <=  eomonth(dateadd(m, -1, getdate()))
group by eomonth(creationdate)
order by 1

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results