Reopen reviews on posts which have not been closed before the review

1

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Different

Q&A for power users of Apple hardware and software

---see: https://meta.stackexchange.com/q/306378
---How to distinguish audits from real reviews in SEDE data?
SELECT TOP(##num?500##)
  'site://review/reopen/'+cast(rt.id as nvarchar),
  timeline = 'site://posts/' + CAST(rt.PostId AS varchar)+'/timeline'  
FROM ReviewTasks rt 
WHERE (ReviewTaskTypeId = 6)
  AND NOT EXISTS
    (
      Select 1 From PostHistory ph
      Where ph.PostHistoryTypeId = 10  -- close
        and ph.PostId = rt.PostId
        and Cast(ph.CreationDate as Date) <= Cast(rt.CreationDate as Date)
    )

Enter Parameters

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