Reopen Votes results


Please login or register to vote for this query.

(click on this box to dismiss)

Reverse Engineering Meta

Q&A about the site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation

  DATEADD(WEEK, DATEDIFF(WEEK, 0, rt.CreationDate), 0) AS CreationDate,
  r.ReviewTaskResultTypeId AS Result
  FROM ReviewTasks AS rt
  INNER JOIN ReviewTaskResults AS r
    ON rt.CompletedByReviewTaskId = r.Id
  WHERE rt.ReviewTaskTypeId = 6 -- Reopen Vote
    AND rt.CreationDate >= '2021-07-01')
SELECT CreationDate,
  COUNT(*) AS 'Total',
  SUM(CASE Result WHEN 13 THEN 1 ELSE 0 END) AS 'Leave closed',
  SUM(CASE Result WHEN 13 THEN 0 ELSE 1 END) AS 'Reopen'
  FROM #temp
  GROUP BY CreationDate
  ORDER BY CreationDate

Enter Parameters

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