Q&A for students, teachers, polyglots, and anyone interested in the techniques of second-language acquisition
DECLARE @UserId int = ##UserId## SELECT DATEPART(hour, CreationDate) as hour, COUNT(*) as number FROM Posts WHERE OwnerUserId = @UserId GROUP BY DATEPART(hour, CreationDate)