Questions by Hour of Day

1

Please login or register to vote for this query.

(click on this box to dismiss)

Distribution of questions per hour of the day for a particular tag.

Lifehacks

Q&A for people looking to bypass life's everyday problems with simple tricks

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

select
  str(datepart(hour,p.creationdate)) + ':00 ~ ' +
  str((datepart(hour,p.creationdate)+1) % 24) + ':00' as Hour,
  count(datepart(hour,p.creationdate)) as '# of questions'
from Posts as p
join PostTags as pt
  on pt.postid = p.id
join Tags as t
  on pt.tagid = t.id
where t.tagname = ##Tag:string##
  and p.PostTypeId = 1  -- 1 is question, 2 is answer
group by datepart(hour, p.creationdate)

Enter Parameters

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