SELECT CONCAT('site://review/late-answers/', reviewTask.I...

0

Please login or register to vote for this query.

(click on this box to dismiss)

GenAI Meta

Q&A for GenAI enthusiasts and practitioners and those interested in learning more about using GenAI tools

SELECT
  CONCAT('site://review/late-answers/', reviewTask.Id, '|Review') AS [Review Link]
  ,CONCAT('site://posts/', reviewTask.PostId, '/timeline|Post ', reviewTask.PostId, '''s Timeline') AS [Post Timeline]
  ,COUNT(reviewAction.Id) AS [Total Actions]
  ,completionType.Name AS [Final Review Action]
  ,reviewTask.CreationDate AS [Review Created]
FROM ReviewTasks reviewTask
JOIN ReviewTaskResults reviewAction ON reviewTask.Id = reviewAction.ReviewTaskId
JOIN ReviewTaskResults finalReviewAction ON reviewTask.CompletedByReviewTaskId = finalReviewAction.Id
JOIN ReviewTaskResultTypes completionType ON finalReviewAction.ReviewTaskResultTypeId = completionType.Id
WHERE 1=1
  AND reviewTask.ReviewTaskTypeId = 5 -- Late Answers Queue only
  AND reviewTask.ReviewTaskStateId = 2 -- Completed reviews only
  AND reviewAction.ReviewTaskResultTypeId <> 1 -- Exclude Skip actions
  AND finalReviewAction.ReviewTaskResultTypeId IN (4, 9) -- Only include reviews which resolved with delete
GROUP BY reviewTask.Id, reviewTask.PostId, reviewTask.CreationDate, completionType.Name
ORDER BY  reviewTask.CreationDate, COUNT(reviewAction.Id) DESC

Enter Parameters

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