Q&A for people who want to be financially literate
-- At what hour do I ask most posts, both questions and answers? -- UTC (GMT) time zone. DECLARE @UserId int = ##UserId##; DECLARE @Part varchar(10) SELECT @Part = CASE ##HourOrDOW:int## WHEN 1 THEN N'hour' WHEN 2 THEN N'weekday' ELSE N'hour' END -- ##HourOrDOW:string## -- CASE ##HourOrDOW## WHEN 1 THEN "hour" WHEN 2 THEN "weekday" ELSE "hour" END SELECT DATEPART("hour", CreationDate) as [Hour you add a post], COUNT(*) as [Number of your posts] FROM Posts WHERE OwnerUserId = @UserId GROUP BY DATEPART(hour, CreationDate)