Accepted vs. Rejected edits per month

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

WITH Raw AS (
  SELECT
    DATEPART(yyyy, COALESCE(ApprovalDate, RejectionDate)) AS yyyy,
    DATEPART(mm, COALESCE(ApprovalDate, RejectionDate)) AS mm,
    COUNT(ApprovalDate) AS ApprovalCount,
    COUNT(RejectionDate) AS RejectionCount
  FROM SuggestedEdits
  GROUP BY
    DATEPART(yyyy, COALESCE(ApprovalDate, RejectionDate)),
    DATEPART(mm, COALESCE(ApprovalDate, RejectionDate))
)
SELECT
  DATEFROMPARTS(yyyy, mm, 1) AS Month,
  ApprovalCount,
  RejectionCount
FROM Raw
ORDER BY Month DESC;

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results