Does not count the suggestededits decided by Community (clicking "improve edit").
Q&A about the site for enthusiasts and power users of Windows Phone OS
WITH Raw AS ( SELECT Id, DATEFROMPARTS(YEAR(CreationDate), MONTH(CreationDate), 1) AS Month, DATEDIFF(s, CreationDate, COALESCE(ApprovalDate, RejectionDate)) AS TimeS FROM SuggestedEdits WHERE ApprovalDate IS NOT NULL OR RejectionDate IS NOT NULL ) SELECT DISTINCT Month, 1.0 * PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY TimeS) OVER (PARTITION BY Month) / 3600 AS MedianHours, 1.0 * AVG(1.0 * TimeS) OVER (PARTITION BY Month) /3600 AS AverageHours --COUNT(*) OVER (PARTITION BY Month) AS Count FROM Raw ORDER BY Month DESC