select top 1000 postid as [Post Link] from posthistory ph...

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

select top 1000
     postid as [Post Link] 
from posthistory ph
where posthistorytypeid = 19
and not exists (
  select * from posthistory 
  where posthistorytypeid = 20
  and postid = ph.postid
  and creationdate > ph.creationdate)
order by creationdate desc
  
  select count(*)
from posthistory ph
where posthistorytypeid = 19

Enter Parameters

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