Find raw text and edit text for question


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

with rev(pid, id, bid) as
select top 40000
       ph.postid pid
     , id
     , -1 bid
from posthistory ph
where ph.posthistorytypeid = 3 -- initial title
union all
select phr.postid
from posthistory phr
inner join rev fr on = phr.postid
where phr.posthistorytypeid = 6 -- revision titile
and >
, revall as (
select pid as postid
     , bid as baseid
     , min(id) as nextid
from rev
group by pid, bid


select revall.postid as [Post Link]
, phnext.text as [raw], phbase.text as [edit]
from revall
inner join posthistory phbase on revall.baseid =
inner join posthistory phnext on revall.nextid =
where baseid <> -1
order by revall.postid, baseid

Enter Parameters

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