WITH PostsByTag AS ( SELECT DISTINCT PostId FROM Post...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

WITH PostsByTag AS (
    SELECT  DISTINCT PostId
    FROM    PostTags
    WHERE   TagId = (SELECT Id FROM Tags WHERE TagName = 'phonegap')
)
SELECT      YEAR(P.CreationDate)    AS [Year],
            MONTH(P.CreationDate)   AS [Month], 
            COUNT(P.id)             AS [Questions Created]
FROM        Posts P
INNER JOIN  PostsByTag PBT          ON PBT.PostId = P.Id
WHERE       P.PostTypeId            = 1
GROUP BY    YEAR(P.CreationDate), MONTH(P.CreationDate)
ORDER BY    YEAR(P.CreationDate), MONTH(P.CreationDate)

Enter Parameters

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