Q&A for professional mathematicians
SELECT DATEADD(mm, (Year(Posts.CreationDate) - 1900) * 12 + Month(Posts.CreationDate) - 1, 0) AS Month, AVG(Posts.score) AS Score FROM Posts LEFT JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId WHERE PostTypes.Name IN ('Question') AND Posts.CreationDate < DATEADD(month, DATEDIFF(month, 0, GETDATE()), 0) GROUP BY Year(Posts.CreationDate), Month(Posts.CreationDate) ORDER BY Year(Posts.CreationDate), Month(Posts.CreationDate)