voting proporation change in april 2014

0

Please login or register to vote for this query.

(click on this box to dismiss)

Notice the sudden change in april from ~10% to 14%

Stack Overflow

Q&A for professional and enthusiast programmers

declare @st_date date = '2013-01-01'

select dateadd(week, datediff(week, 0, p.CreationDate), 0) wk,
cast(sum( case when votetypeid = 3 then 1 else 0 end ) as float)/
     sum( case when votetypeid = 2 then 1 else 0 end ) neg_to_pos_ratio
 from (
      select votes.votetypeid, votes.CreationDate
      from votes
      join posts on posts.id = votes.postid
      where votes.CreationDate > dateadd(year, 0, @st_date)
      and posts.posttypeid = 1 -- question
      ) p
 group by dateadd(week, datediff(week, 0, p.CreationDate), 0)
 order by dateadd(week, datediff(week, 0, p.CreationDate), 0)

Enter Parameters

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