Q&A for people studying math at any level and professionals in related fields
DECLARE @answercount int = ##AnswerCount## select top 50000 Year(CreationDate) as [Year], count(*) as [Count], avg(convert(decimal(10,2), Score)) as [Average Score],avg(convert(decimal(10,2), AnswerCount)) as [Average Answer Count], avg(convert(BigInt, ViewCount)) as [Average Views] from posts where PostTypeID = 1 and DeletionDate is null and AnswerCount = @answercount group by Year(CreationDate) order by Year(CreationDate)