SELECT JSON_VALUE(Text, '$.OriginalQuestionIds[0]') FROM ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT JSON_VALUE(Text, '$.OriginalQuestionIds[0]')
  FROM PostHistory AS ph
  WHERE ph.PostId = 7558022
    AND ph.PostHistoryTypeId = 10 -- question closed
    AND ph.Comment = 101 -- as a duplicate

Enter Parameters

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