Questions by Time of Day and Day of Week

0

Please login or register to vote for this query.

(click on this box to dismiss)

Designed to consider whether "night" questions have more visibility than "day" questions

Physics

Q&A for active researchers, academics and students of physics

-- Questions by Time of Day and Day of Week
-- Designed to consider whether "night" questions have more visibility than "day" questions

SELECT
datepart(weekday, Posts.CreationDate) Weekday,
CASE ROUND(datepart(hour, Posts.CreationDate)/4, 1)
     WHEN 0 THEN 'early morning'
     WHEN 1 THEN 'morning'
     WHEN 2 THEN 'late morning'
     WHEN 3 THEN 'afternoon'
     WHEN 4 THEN 'late afternoon'
     WHEN 5 THEN 'evening'
END AS Daytime
-- count(Posts.Id) Questions
FROM Posts
WHERE PostTypeid = 1 -- 1 = Question
--GROUP BY datepart(weekday, Posts.CreationDate),
--         datepart(hour, Posts.CreationDate)
-- order by datepart(hour, Posts.CreationDate)

---order by count(posts.id) desc

Enter Parameters

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