Site's questions per hour of the day

1

Please login or register to vote for this query.

(click on this box to dismiss)

Questions grouped per hour of the day, posted less than X Days ago; also graphed

History

Q&A for historians and history buffs

-- Questions by Hour of Day
-- Distribution of questions per hour of the day for a particular tag.

SELECT
  CAST(STR(datepart(hour,p.creationdate)) AS int) as Hour,
  COUNT(datepart(hour,p.creationdate)) AS '# of questions'
FROM Posts AS p
WHERE p.PostTypeId = 1 -- Question
-- and p.creationdate less than X weeks
AND DATEDIFF(DAY, p.CreationDate, GETDATE()) < ##Days:int?7##
GROUP BY datepart(hour, p.creationdate)

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results