Returns the full ReviewTaskResults table, with a link to the corresponding review page on the site. Note that the site displays the user associated with each review task result, but the table does not.
Q&A about the site for information security professionals
SELECT TOP 50 'site://review/' + ( CASE -- WHEN ReviewTasks.ReviewTaskTypeId = 1 THEN 'suggested-edits' --WHEN ReviewTasks.ReviewTaskTypeId = 2 THEN 'close' --WHEN ReviewTasks.ReviewTaskTypeId = 3 THEN 'low-quality-posts' --WHEN ReviewTasks.ReviewTaskTypeId = 4 THEN 'first-posts' --WHEN ReviewTasks.ReviewTaskTypeId = 5 THEN 'late-answers' --WHEN ReviewTasks.ReviewTaskTypeId = 6 THEN 'reopen' WHEN ReviewTasks.ReviewTaskTypeId = 9 THEN 'flagged' -- 7, 10, 11 left for the reader to implement ELSE 'null' END ) + '/' + CAST(ReviewTaskResults.ReviewTaskId AS varchar) + '|' + CAST(ReviewTaskResults.ReviewTaskId AS varchar) AS 'Review Link', ReviewTaskResults.* FROM ReviewTaskResults JOIN ReviewTasks ON ReviewTaskResults.ReviewTaskId = ReviewTasks.Id JOIN ReviewTaskTypes ON ReviewTaskTypes.Id = ReviewTasks.ReviewTaskTypeId WHERE ReviewTaskResults.ReviewTaskResultTypeId = 7 ORDER BY ReviewTaskResults.CreationDate DESC