Hourly tag questions

0

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Ubuntu

Q&A for Ubuntu users and developers

WITH QuestionsByMonth  AS (
SELECT (DATEPART(HOUR, q.CreationDate)*60 + DATEPART(MINUTE, q.CreationDate))/4 AS [Hourly],
          q.Id AS id

    FROM        Posts           q
    INNER JOIN  PostTags        pt
    ON          q.Id            = pt.PostId
    INNER JOIN  Tags            t
    ON          t.Id            = pt.TagId

    WHERE       q.PostTypeId    = 1
    AND         t.TagName       = ##TagName1:string?java##
    AND q.CreationDate >= ##PostFrom:string?2020-01-01##

)
SELECT
q.[Hourly], COUNT(q.id) AS Qs

FROM        QuestionsByMonth   q
GROUP BY    q.[Hourly]
ORDER BY    q.[Hourly]

Enter Parameters

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