Count of first-posts per week

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

WITH Raw AS (
  SELECT
    DATEADD(dd,
      7 * FLOOR(DATEDIFF(day, '1970-01-05', CreationDate) / 7),
      '1970-01-05') AS PostWeek,
    Id
  FROM Posts
  WHERE Id IN (
    SELECT MIN(Id) FROM Posts GROUP BY OwnerUserId
  )
)
SELECT
  PostWeek,
  COUNT(*) AS Count
FROM Raw
GROUP BY PostWeek
ORDER BY PostWeek;

Enter Parameters

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