Suggested edit approvals / rejections by month

1

Please login or register to vote for this query.

(click on this box to dismiss)

Poker Meta

Q&A about the site for serious players and enthusiasts of poker

WITH Raw AS (
  SELECT
    COALESCE(ApprovalDate, RejectionDate) AS CreationDate,
    CASE WHEN ApprovalDate IS NOT NULL THEN 1 ELSE 0 END AS Approved
  FROM SuggestedEdits
)
SELECT
  DATEFROMPARTS(YEAR(CreationDate), MONTH(CreationDate), 1) AS Month,
  CASE WHEN Approved = 1 THEN 'Approved' ELSE 'Rejected' END AS IsApproved,
  COUNT(*) AS Count
FROM Raw
GROUP BY
  DATEFROMPARTS(YEAR(CreationDate), MONTH(CreationDate), 1),
  Approved
ORDER BY Month DESC, Approved

Enter Parameters

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