Invalidated First Post Reviews - Questions

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;

SELECT 'site://posts/' + CAST(PostId AS nvarchar) + '/timeline|' + p.Title as [TimeLine Link]
FROM ReviewTasks r
JOIN Posts p ON r.PostId = p.Id
  WHERE
  p.PostTypeId = @Question
  AND
  DATEDIFF(d, r.CreationDate, r.DeletionDate) = 14
  AND
  r.ReviewTaskTypeId = @FirstPostReview
  AND
  r.ReviewTaskStateId = @Invalid
  AND
  YEAR(r.DeletionDate) = 2021
ORDER BY r.DeletionDate DESC;

Enter Parameters

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