Posts With a reopen record without a close

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

SELECT  
pOpened.PostID [Post Link]
     
FROM 
  PostHistory pOpened
  LEFT JOIN PostHistory pClosed 
  ON pOpened.PostID = pClosed.PostID
   and pClosed.postHistoryTypeID =10 --closed
 WHERE pOpened.postHistoryTypeID =11 --reopened
 and pClosed.PostID is  null

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results