Q&A for professional mathematicians
with ascore_cte AS ( SELECT q.Id AS qid, q.CreationDate AS cre, SUM(a.Score) AS ascore FROM Posts q INNER JOIN Posts a ON a.ParentId=q.Id WHERE q.PostTypeId=1 AND (q.CommunityOwnedDate IS NULL) ---only non-CW questions GROUP BY q.Id, q.CreationDate ) SELECT eomonth(cre), AVG(CAST(ascore AS decimal)) AS [Average sum of answer-scores] FROM ascore_cte GROUP BY eomonth(cre) ORDER BY eomonth(cre)