Yearly activity by year of registration

1

Please login or register to vote for this query.

(click on this box to dismiss)

Moderators

Q&A for community managers, administrators, and moderators

SELECT
  DATEPART(yyyy, Posts.CreationDate) AS PostYear,
  CAST(DATEPART(yyyy, Users.CreationDate) AS VARCHAR(MAX)) AS RegYear,
  COUNT(*) AS Count
FROM Posts, Users
WHERE
  Posts.OwnerUserId = Users.Id
  AND
  Posts.CreationDate > Users.CreationDate
GROUP BY
  DATEPART(yyyy, Users.CreationDate),
  DATEPART(yyyy, Posts.CreationDate)
ORDER BY
  RegYear, PostYear

Enter Parameters

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