Q&A for students, teachers, polyglots, and anyone interested in the techniques of second-language acquisition
-- 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 [Time] = DATEPART("weekday", CreationDate) + DATENAME("hour", CreationDate) / 24, COUNT(*) AS [Number of posts] FROM Posts GROUP BY DATENAME("hour", CreationDate), DATEPART("weekday", CreationDate) ORDER BY DATENAME("hour", CreationDate), DATEPART("weekday", CreationDate)