select as [Post Link] , p.closeddate , as [Post...


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select as [Post Link]
     , p.closeddate
     , as [Post Link]
     , a.creationdate [created on]
     , v.creationdate [undeleted on]
from posthistory ph
inner join posts p on ph.postid =
inner join posts a on a.parentid = -- and the answers
inner join votes v on v.postid = -- and the answer votes
where ph.posthistorytypeid = 10 -- question is closed
and ph.comment in ( 101 , 1)  -- as duplicate
and p.answercount > 0 -- has answers
and p.closeddate is not null -- is still closed
and v.votetypeid = 11 -- undeleted answer
and v.creationdate > p.closeddate -- undeleted after the question was closed

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results