Dupehammered questions

0

Please login or register to vote for this query.

(click on this box to dismiss)

Role-playing Games

Q&A for gamemasters and players of tabletop, paper-and-pencil role-playing games

SELECT TOP 10 h.PostId AS [Post Link], h.CreationDate AS 'Close date',
  ca2.Value AS [User Link], ca3.Value
  FROM PostHistory AS h
  CROSS APPLY (
    (SELECT Value FROM OPENJSON(
      (SELECT Value FROM OPENJSON(h.Text) WHERE [Key] = 'Voters')
    ))
  ) AS ca1
  CROSS APPLY (
    (SELECT Value FROM OPENJSON(ca1.VALUE) WHERE [Key] = 'Id')
  ) AS ca2
  OUTER APPLY (
    (SELECT Value FROM OPENJSON(ca1.VALUE) WHERE [Key] = 'BindingReason')
  ) AS ca3
  WHERE h.PostHistoryTypeId = 10 -- Close
    AND h.Comment = 101 -- Exact Duplicate
  ORDER BY h.CreationDate DESC

Enter Parameters

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