Average answers score over years

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

SELECT 
    datepart(yyyy, CreationDate) as 'year', avg(Score) as 'average'
FROM
    Posts
WHERE 
    PostTypeId = 2 
     and 
    CommunityOwnedDate is null
     and 
    ClosedDate is null
     and
    Score > 10  
GROUP BY
    datepart(yyyy, [CreationDate])

Enter Parameters

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