Q&A Activity by UTC Hour

1

Please login or register to vote for this query.

(click on this box to dismiss)

The Workplace Meta

Q&A about the site for members of the workforce navigating the professional setting

SELECT    DATEPART(HOUR, p.CreationDate)          AS [Hour],
          SUM(CASE WHEN p.PostTypeId = 1 THEN 1 ELSE 0 END) AS [Qs],
          SUM(CASE WHEN p.PostTypeId = 2 THEN 1 ELSE 0 END) AS [As],
          COUNT(p.id)                             AS [Posts]
FROM      posts p
WHERE     p.PostTypeId IN (1, 2)
GROUP BY  DATEPART(HOUR, p.CreationDate)
ORDER BY  DATEPART(HOUR, p.CreationDate)
;

Enter Parameters

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