Registered Users By Year

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT *, COUNT(*)
FROM (
  SELECT 
  cast (DATEPART(YYYY, Users.CreationDate) as int)[YEAR]
  FROM Users
) AS t
where [YEAR] < year(getdate())
GROUP BY [YEAR]
ORDER BY [YEAR] ASC

Enter Parameters

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