Reviews Over Time (per week)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Cooking

Q&A for professional and amateur chefs

SELECT
  DATEADD(DAYOFYEAR, -(DATEPART(DAYOFYEAR, rtr.CreationDate) % ##PeriodLength:int?7##), rtr.CreationDate) AS [Date],
  COUNT(rt.Id) AS [Reviews Completed]
FROM ReviewTasks AS rt
INNER JOIN ReviewTaskResults AS rtr ON rtr.ReviewTaskId = rt.Id
WHERE rt.ReviewTaskStateId = 2  -- Completed reviews only
GROUP BY DATEADD(DAYOFYEAR, -(DATEPART(DAYOFYEAR, rtr.CreationDate) % ##PeriodLength##), rtr.CreationDate)
ORDER BY DATEADD(DAYOFYEAR, -(DATEPART(DAYOFYEAR, rtr.CreationDate) % ##PeriodLength##), rtr.CreationDate);

Enter Parameters

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