Q&A about the site for Data science professionals, Machine Learning specialists, and those interested in learning more about the field
DECLARE @UserId int = ##UserId?209103## SELECT DATEADD(YEAR, DATEDIFF(YEAR, 0, CreationDate), 0) AS [YEAR] , COUNT(*) AS Count FROM Posts WHERE OwnerUserId = @UserId GROUP BY DATEADD(YEAR, DATEDIFF(YEAR, 0, CreationDate), 0) ORDER BY [YEAR] DESC