Number of votes per month


Please login or register to vote for this query.

(click on this box to dismiss)

Accounting only for votes cast on questions less than 31 days after the question was created.

German Language Meta

Q&A about the site for speakers of German wanting to discuss the finer points of the language and translation

WITH QuestStatsByMonth  AS (
    SELECT DATEADD (month, DATEDIFF (month, 0, q.CreationDate), 0)  AS [Month],
    SUM (q.Score) AS TotalScore,
    COUNT (q.Id) AS NumQuestions,
    COUNT (v.Id) AS Votes

    FROM Posts q
    JOIN Votes v ON q.Id = v.PostId AND (v.VoteTypeId=2 OR v.VoteTypeId=3)
    WHERE q.PostTypeId = 1

    GROUP BY DATEADD (month, DATEDIFF (month, 0, q.CreationDate), 0)

    q.Votes AS 'votes'

FROM QuestStatsByMonth q
ORDER BY q.[Month]

Enter Parameters

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