Q&A for professional mathematicians
SELECT eomonth(q.CreationDate), SUM(case when (DATEDIFF(day, u.CreationDate, q.CreationDate)<=##days?100##) then 1 else 0 end) AS [New Users], COUNT(q.Id) AS [All questions] FROM Posts q INNER JOIN Users u ON q.OwnerUserId=u.Id WHERE (q.PostTypeId=1) --only questions GROUP BY eomonth(q.CreationDate) ORDER BY eomonth(q.CreationDate)