Q&A for people who build and repair bicycles, people who train cycling, or commute on bicycles
with AnswersByMonth as ( select dateadd(week, datediff(week, 0, a.CreationDate), 0) mo, count(*) Answers from Posts a where PostTypeId=2 and CreationDate > getdate()-180 group by dateadd(week, datediff(week, 0, a.CreationDate), 0) ) select mo, cast(datediff(week, u.CreationDate, a.CreationDate)/12 as varchar(8)) AccountAgeYears, count(*)*100.0/Answers PctAnswers from Posts a join AnswersByMonth abm on abm.mo=dateadd(week, datediff(week, 0, a.CreationDate), 0) join Users u on u.Id=a.OwnerUserId and u.CreationDate < a.CreationDate where PostTypeId=2 and a.CreationDate > getdate()-180 group by mo, datediff(week, u.CreationDate, a.CreationDate)/12, Answers order by mo