Based on the logic of the query you linked to I assume this query answers your question, if you don't care about deleted posts1
Notice that I don't use any temporary tables to store intermediate results (something the other query does). Instead I used the OVER clause offered by the T-Sql if SqlServer to calculate the running total.
DECLARE @Increments int = ##Increments?30##
-- Increments: Number of days per group "Default is 30"
DECLARE @Results int = ##Results?12##
-- Results: Number of groups to pull "Default is 12"
-- based on increments and results determine the
-- start date of posts by substracting from max creationdate
declare @lowest datetime
select @lowest = dateadd(d, - (@Increments * @Results), max(creationdate))
from posts;
declare @toZeroQ int
declare @toZeroA int
select @toZeroQ = sum(case when posttypeid=1 then 1 else 0 end)
, @toZeroA = sum(case when posttypeid=2 then 1 else 0 end)
from posts
where datediff(d, @lowest, creationdate) / @Increments = 0
and creationdate >= @lowest
and posttypeid in (1,2)
select dateadd(d, (days+1) * @increments, @lowest) as [date] -- recreate a date
, sum(qcnt) over ( order by days) - @toZeroQ as Questions -- sum of question count
, sum(acnt) over ( order by days) - @toZeroA as Answers -- sum of answercount
from (
-- calc the sum for questions and answer per number of days per group
select
datediff(d, @lowest, creationdate) / @Increments as days
, sum(case when posttypeid=1 then 1 else 0 end) as qcnt
, sum(case when posttypeid=2 then 1 else 0 end) as acnt
from posts
where creationdate between @lowest
and dateadd(d, @Increments * @Results -1 ,@lowest)
and posttypeid in (1,2)
group by datediff(d, @lowest, creationdate) / @Increments
) as counts
The graph produced by this query shows the following result at the time of posting:
1. Notice that deleted posts are not available in SEDE so technically more questions (and answers) are posted but those are only available for SE Employees.
Peer Pressure
, which is highly unlikely. :-)