Don't touch my junk.

0

Please login or register to vote for this query.

(click on this box to dismiss)

スタック・オーバーフローMeta

プログラマーと熱狂的なプログラマーのためのサイトに関する質問と回答

with CandidateEdits as (
    select distinct
           ph.Id as EditId,
           ph.RevisionGUID as EditGUID,
           ph.PostId EditPost,
           ph.CreationDate as EditDate
    from PostHistory as ph
        inner join Posts as p on ph.PostId = p.Id and OwnerUserId != UserId
    where UserId = ##UserId:int##
      and PostHistoryTypeId in (4,5) --Title/Body edits.
      and PostId = 21539
)
select ce.*, ph.*
from CandidateEdits as ce Left Outer Join PostHistory as ph on
             EditPost = ph.PostId
         and CreationDate between DateAdd(mm, -6, EditDate) and EditDate
         and Id < EditId
         and RevisionGUID != EditGUID

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results