Q&A about the site for programming puzzle enthusiasts and code golfers
-- At what hour do I ask most posts, both questions and answers? -- UTC (GMT) time zone. The week starts with Sunday. -- Parameters: -- UserId -- HourOrDOW (1 - hours, 2 - day of week) -- DEFINE @var = DATEPART("weekday", CreationDate), DATENAME("hour", CreationDate); SELECT DATEPART("weekday", CreationDate) AS [Weekday you add a post], DATENAME("hour", CreationDate), COUNT(*) AS [Number of posts answered] FROM Posts GROUP BY DATEPART("weekday", CreationDate), DATENAME("hour", CreationDate) ORDER BY DATEPART("weekday", CreationDate), DATENAME("hour", CreationDate)