Anton.Sandbox

0

Please login or register to vote for this query.

(click on this box to dismiss)

Portuguese Language

Q&A for linguists, teachers and learners wanting to discuss the finer points of the Portuguese language

-- 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 DATENAME("hour", CreationDate), DATEPART("weekday", CreationDate)
  ORDER BY DATENAME("hour", CreationDate), DATEPART("weekday", CreationDate)

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results