6

I can see edits that have made to my posts, but I want to see edits that have been made to posts that I've edited (after I've edited them).

I mainly want to see which of my edits have been rolled back, but I'm also curious if I've missed anything that other editors have added or if I've introduced any mistakes with an edit.

2

1 Answer 1

6

This query does that for you.

The query uses a CTE to find in the PostHistory table the posts you edited or rolledback. The rows with PostHistoryTypeid 4 till 9 will indicate that. Once we have that set we can join with PostHistory again to find the posts that were edited / rolledback after you put your edit in.

;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

When run today this is your result:

query result showing links, creationdate and edit or rollback

Keep in mind SEDE is updated once a week on Sunday.
Use the very useful SEDE Tutorial written by the awesome Monica Cellio.
Say "Hi" in SEDE chat.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .