Q&A for scholars and enthusiasts of literature
select qlist.uid as userId, count(ph.Id) as edit_counttotal, count(ph.Id)/ cast(count(distinct qlist.pid) as numeric) as edit_countavg, datediff (month,cast('2015-03-01' as datetime), qlist.qdate) as month from PostHistory ph, (select p.Id as pid, userlist.uid as uid, p.AcceptedAnswerId as panswerid, p.CreationDate as qdate, datediff(month,cast('2015-03-01' as datetime), p.CreationDate) as tq from Posts p, (select p.OwnerUserId as uid from Posts p, PostTags pt, Users u where p.OwnerUserId=u.Id and p.Id=pt.PostId and (pt.TagId=100570 or pt.TagId=40102 or pt.TagId=109466 or pt.TagId=116033 or pt.TagId=113994 or pt.TagId=24100 or pt.TagId=99347 or pt.TagId=132868) and p.PostTypeid=1 and p.CreationDate>=cast('2015-03-01' as datetime) and p.CreationDate<=cast('2017-03-31' as datetime) group by p.OwnerUserId ) userlist where userlist.uid=p.OwnerUserId and p.CreationDate>=cast('2015-03-01' as datetime) and p.CreationDate<=cast('2017-03-31' as datetime) and p.PostTypeId=1 ) qlist where ph.PostId=qlist.pid and (ph.PostHistoryTypeId=3 or ph.PostHistoryTypeId=4 or ph.PostHistoryTypeId=5) group by qlist.uid, datediff(month,cast('2015-03-01' as datetime), qlist.qdate) order by qlist.uid, datediff(month,cast('2015-03-01' as datetime), qlist.qdate)