select p.Title, p.Body, p.Id, p.CreationDate, p4.Title, p...


Please login or register to vote for this query.

(click on this box to dismiss)

Artificial Intelligence

Q&A for people interested in conceptual questions about life and challenges in a world where "cognitive" functions can be mimicked in purely digital environment

select p.Title, p.Body, p.Id, p.CreationDate,
  --JSON_VALUE(ph.Text, '$.OriginalQuestionIds[0]') as DuplicateId,
  p4.Title, p4.Body, p4.Id, p4.CreationDate
from posts p
inner join PostHistory ph on ph.postid =
inner join posts p4 on = JSON_VALUE(ph.Text, '$.OriginalQuestionIds[0]')
where p.posttypeid = 1  -- 1
and ph.PostHistoryTypeId = 10  -- closed
and ph.comment = 101  -- as duplicate
and p.CreationDate >= '2019-08-01'
and p.CreationDate < '2020-08-01';

Enter Parameters

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