Average reviews per close/reopen review task

1

Please login or register to vote for this query.

(click on this box to dismiss)

Average number of reviews (including skips) per close/reopen review task, by year.

Operations Research Meta

Q&A about the site for operations research and analytics professionals, educators, and students

SELECT
  YEAR(r.date) AS [Year],
  COUNT(r.reviews) AS [Tasks],
  CONVERT(DECIMAL(10,2),AVG(CAST(r.reviews AS float))) AS [Reviews per Task]
FROM
 (SELECT
    COUNT(DISTINCT(rt.Id))+COUNT(DISTINCT(rtr.Id)) AS reviews,
    MAX(rt.CreationDate) AS date
  FROM ReviewTasks AS rt
  LEFT JOIN ReviewTaskResults AS rtr ON rtr.ReviewTaskId = rt.Id
  WHERE
    rt.ReviewTaskTypeId in (2,6)
  GROUP BY rt.Id) AS r
GROUP BY YEAR(r.date)
ORDER BY YEAR(r.date);

Enter Parameters

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