Count of posts by week

1

Please login or register to vote for this query.

(click on this box to dismiss)

Audio-Video Production Meta

Q&A about the site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation

WITH Raw AS (
  SELECT
    DATEADD(dd,
      7 * FLOOR(DATEDIFF(day, '1970-01-05', CreationDate) / 7),
      '1970-01-05') AS PostWeek,
    Id
  FROM Posts
)
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