See edits made to posts I've edited?

0

Please login or register to vote for this query.

(click on this box to dismiss)

https://meta.stackoverflow.com/questions/402499

Stack Overflow

Q&A for professional and enthusiast programmers

;with PostsEdited as
(
  select distinct postid, creationdate
  from posthistory
  where userid = ##userid:int?3064538##
  and posthistorytypeid in (4, 5, 6, 7, 8, 9) -- edits, rollback
)
select distinct 
       ph.postid [Post Link]
     , ph.creationdate  
     , case ph.posthistorytypeid 
       when 4 then case when ph.userid < 0 then 'community' else 'edit' end
       when 5 then case when ph.userid < 0 then 'community' else 'edit' end
       when 6 then case when ph.userid < 0 then 'community' else 'edit' end
       when 7 then 'rollback'
       when 8 then 'rollback'
       when 9 then 'rollback'
       end [edit/rollback] 
from posthistory ph
inner join PostsEdited pe 
  on pe.postid = ph.postid 
  and ph.posthistorytypeid in (4, 5, 6, 7, 8, 9) -- edits, rollback
  and pe.creationdate < ph.creationdate 
  and ph.userid <> ##userid:int?3064538##
order by ph.creationdate desc

Enter Parameters

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