Duplicate Questions

0

Please login or register to vote for this query.

(click on this box to dismiss)

Project Management

Q&A for project managers

SELECT 
  p.Id AS pId,
  p.Title as pTitle,
  p.Body as pBody,
  pd.Id as pdId,
  pd.Title as pdTitle,
  pd.Body as pdBody,
  p.CreationDate as pCreationDate
FROM PostHistory ph
  JOIN Posts p ON p.Id = ph.PostId
  JOIN Posts pd ON pd.Id = CAST(JSON_VALUE(ph.Text, '$.OriginalQuestionIds[0]') AS nvarchar)
WHERE 
  p.PostTypeId = 1 -- Question
  AND ph.PostHistoryTypeId = 10 -- Close event
  AND ph.Comment = 101 -- Dupe
  AND ph.CreationDate >= '01/01/2024 12:00:00 AM'

Enter Parameters

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