Questions and Answers per week

0

Please login or register to vote for this query.

(click on this box to dismiss)

Plot the site activity by voting, questions, answers and comments, aggregated per week.

Stack Overflow

Q&A for professional and enthusiast programmers

with Voting as (
    select DATEPART(Year, v.CreationDate) * 100
       + DatePart(Month, v.CreationDate) as YearMon,
       case when p.PostTypeId = 1 then 'Q' else 'A' end + vt.Name as Series,
       1 as Vote
    from Posts p,
         Votes v,
         VoteTypes vt
    where p.Id = v.PostId
      and v.VoteTypeId = vt.Id
)
select YearMon, Series, Count(Vote) as Votes
from Voting
group by YearMon, Series

Enter Parameters

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