DECLARE @StartDate datetime = '2010-01-01'; DECLARE @EndD...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Sports

Q&A for participants in team and individual sport activities

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)

Enter Parameters

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