Q&A about the site for professors, theologians, and those interested in exegetical analysis of biblical texts
SELECT DATEADD(hour, DATEDIFF(hour, 0, CreationDate), 0) AS Hour, COUNT(*) AS NumberOfPosts FROM Posts WHERE PostTypeId=1 AND CreationDate > DATEADD(week, -180, GETDATE()) -- This filters out posts older than 4 weeks GROUP BY DATEADD(hour, DATEDIFF(hour, 0, CreationDate), 0) ORDER BY Hour;