Suggested edit weekly statistics

0

Please login or register to vote for this query.

(click on this box to dismiss)

For each calendar week, show some statistics about suggested edits created that week (duration and outcome of review).

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT
  DateAdd(Day, DateDiff(Day, 0, SE.CreationDate) / 7 * 7, '1900-01-01') AS [Week from],
  --Convert(varchar(10), DateAdd(Day, DateDiff(Day, 0, SE.CreationDate) / 7 * 7, '1900-01-01'), 126) AS [Week from],
  Count(*) AS [Count],
  Round(COUNT(CASE WHEN SE.ApprovalDate IS NOT NULL THEN 1 END) * 100.0 / Count(*), 1) AS [% approved],
  Round(Avg(DateDiff(Second, SE.CreationDate, IsNull(SE.ApprovalDate, SE.RejectionDate)) / 60.0), 1) AS [Duration (min)]
FROM SuggestedEdits SE
GROUP BY DateDiff(Day, 0, SE.CreationDate) / 7
ORDER BY [Week from] ASC

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results