get duplicated/related id

0

Please login or register to vote for this query.

(click on this box to dismiss)

Drones and Model Aircraft Meta

Q&A for experienced flyers, pilots, and builders of drones and model aircraft

--select p.id, p.title
--from posts p
--inner join PostHistory ph on ph.postid = p.id 
--where p.posttypeid = 1 -- q
--and ph.PostHistoryTypeId = 10 -- closed
--and ph.comment = 101 -- as duplicate

select l.postid, l.relatedpostid, p.title, p2.title, ph.text
from postlinks l
inner join PostHistory ph on ph.postid = l.postid
inner join posts p on p.id = l.postid
inner join posts p2 on p2.id = l.relatedpostid
where p.posttypeid = 1
and ph.PostHistoryTypeId = 10
and ph.comment = 101
order by l.postid

Enter Parameters

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