SELECT DATEPART( YEAR, q.CreationDate ) * 100 + DATEPART...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Meta Stack Exchange

Q&A for meta-discussion of the Stack Exchange family of Q&A websites

-- Enter Query Title
-- Enter Query Description

SELECT
    DATEPART( YEAR, q.CreationDate ) * 100 + DATEPART( MONTH, q.CreationDate )
    , AVG( q.ViewCount)
FROM
    Posts q
WHERE
    q.PostTypeId = 1
GROUP BY
    DATEPART( YEAR, q.CreationDate ) * 100 + DATEPART( MONTH, q.CreationDate )
ORDER BY
    1

Enter Parameters

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