I want to know where to look for statistics for a specific Stack Exchange site, such as Mathematics, how many questions per month were added, to see the historical growth, patterns, peaks of rate, if it stalled, etc.
This particular question can be solved with a relatively simple SEDE query:
Note that SEDE is updated once a week on Sunday morning, and deleted questions aren't included in the results.
For reference, here is the SQL of the query:
DECLARE @StartDate datetime = '2010-01-01'; DECLARE @EndDate datetime = '2016-09-01'; SELECT dateadd(month, datediff(month, 0, creationdate), 0), count(*) FROM posts WHERE posttypeid = 1 AND creationdate BETWEEN @StartDate AND @EndDate GROUP BY dateadd(month, datediff(month, 0, creationdate), 0) ORDER BY dateadd(month, datediff(month, 0, creationdate), 0)
You can run this query that shows the counts for questions, answers and the deleted posts of both categories:
Here is the actual query:
It queries the table
postswithdeleted that contains some data from all posts ever posted. The first select of the union creates a sum over the end of month dates of the creation date of posts with a posttypeid = 1 (Questions) or posttypeid =2 (Answers). The second query of the union does the same but now for deletiondate. One overall select and group by is used to consolidate the results per month. Don't forget to order by ...
-- final group select eom , sum(q) as Questions , sum(a) as Answers , sum(dq) as [del-q] , sum(da) as [del-a] from ( -- all questions and answers select eomonth(creationdate) as eom , sum(case when posttypeid = 1 then 1 else 0 end ) as Q , sum(case when posttypeid = 2 then 1 else 0 end ) as A , 0 as dq , 0 as da from postswithdeleted p group by eomonth(creationdate) union -- when posts were deleted select eomonth(deletiondate) , 0 , 0 , sum(case when posttypeid = 1 then 1 else 0 end) as DQ , sum(case when posttypeid = 2 then 1 else 0 end ) as DA from postswithdeleted p where p.deletiondate is not null group by eomonth(deletiondate) ) as alldata group by eom order by eom
Keep in mind SEDE is only updated once a week.
The user pathway to gain access to the statistics for a particular site is by attaining the Access to Site Analystics privilege at a reputation of 25,000 on that site.
Other ways to gain access to them which are provided by the Stack Exchange network are:
- Getting elected as a Community Moderator on that site.
- Via the Stack Exchange Data Explorer which provides access to all sites, but full functionality is only available to those with SQL skills.
A small subset of current (but not historic) statistics is available at on the Stack Exchange Sites page.