Question Reopens by Vote Counts

1

Please login or register to vote for this query.

(click on this box to dismiss)

GIS

Q&A for cartographers, geographers and GIS professionals

SELECT TOP 10
  ph.PostId AS [Post Link],
  u.DisplayName AS CloseUser,
  COUNT(v.value) AS VoterCount
FROM PostHistory ph
JOIN Posts p ON p.Id = ph.PostId
JOIN Users u ON u.Id = ph.UserId
CROSS APPLY OPENJSON(ph.Text,'$.Voters') AS v
WHERE PostHistoryTypeId = 10
  AND p.PostTypeId = 1
GROUP BY
  ph.PostID,
  ph.Text,
  ph.Comment,
  u.DisplayName

Enter Parameters

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