Review Queue Count per Post

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE @Question tinyint = 1;
DECLARE @Answer tinyint = 2;
DECLARE @FirstPostReview tinyint = 4;
DECLARE @Invalid tinyint = 3;
DECLARE @Completed tinyint = 2;


SELECT 'site://posts/' + CAST(PostId AS nvarchar) + '/timeline|' + p.Title as [TimeLine Link], COUNT(r.PostId)
FROM ReviewTasks r
JOIN Posts p ON r.PostId = p.Id
JOIN ReviewTaskTypes rt ON r.ReviewTaskTypeId = rt.Id
  WHERE p.PostTypeId = @Question
  AND YEAR(r.CreationDate) = 2021
  AND MONTH(r.CreationDate) = 7

GROUP BY r.PostId, p.Title
ORDER BY r.PostId DESC;

Enter Parameters

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