select count(id) as PostCount, SUM(ABS(SCORE)) as VotesCo...

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 
  count(id) as PostCount, 
  SUM(ABS(SCORE)) as VotesCount, 
  YEAR(CreationDate) as Year,
  CAST(SUM(ABS(SCORE)) as float)/ CAST(COUNT(ID) as float) as VotePerPost
from Posts
GROUP BY YEAR(CreationDate)

Enter Parameters

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