จำนวนวันในการปิดคำถามตามเดือนที่สร้าง ไม่จำเป็นต้องใช้ตารางทั้งหมด
Days to Close a Question by Creation Month.It is not neccessary to use all the tables.
 Tags:  Id [ number]  TagName [ text]  Count [ number]  ExcerptPostId [ number]  WikiPostId [ number] 
SELECT date1, AVG(diff1) AS cnt FROM (SELECT DATEDIFF(day, d.CreationDate, ClosedDate) AS "diff1", FORMAT(d.CreationDate, 'yy-MM') AS "date1", FORMAT(d.ClosedDate, 'yy-MM') AS "date2", (d.Id) AS id FROM Posts AS d LEFT JOIN PostHistory AS ph ON ph.PostId = d.Id LEFT JOIN PostLinks AS pl ON pl.PostId = d.Id LEFT JOIN Posts AS o ON o.Id = pl.RelatedPostId WHERE d.PostTypeId = 1 AND ph.PostHistoryTypeId = 10) AS t1 GROUP BY date1 ORDER BY date1