SELECT DATEADD( day, -age*28, GETDATE() ) AS [date], c A...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Interpersonal Skills

Q&A for people looking to improve their interpersonal communication skills

-- DATEADD( week, -AgeWeeks, GETDATE() ) AS DateWeek,

SELECT 
DATEADD( day, -age*28, GETDATE() ) AS [date],
c AS [Number of distinct users posting answers in each 28-day period]
FROM 
  (SELECT
  DATEDIFF(day, CreationDate, GETDATE()) / 28 AS age, 
  COUNT( DISTINCT OwnerUserId ) AS c
  FROM Posts Where PostTypeId = 2
  GROUP BY DATEDIFF(day, CreationDate, GETDATE()) / 28
  ) foo
ORDER BY [date]

Enter Parameters

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