First users to cast close votes on a closed post

1

Please login or register to vote for this query.

(click on this box to dismiss)

Returns the user Id of the first user to cast a close vote on recently closed questions, ordered by closure timestamp.

Stack Overflow

Q&A for programmers

SELECT TOP 200
  PostHistory.PostId AS [Post Link],
  PostHistory.CreationDate AS PostClosureDate,
  PostHistory.UserId AS [User Link],
  PostHistory.Comment AS PostClosureComment,
  CAST(SUBSTRING(
     PostHistory.Text, 
     CHARINDEX('Voters',PostHistory.Text)+15,
     CHARINDEX('Display',  PostHistory.Text)
       -CHARINDEX('Voters',PostHistory.Text)-17
     ) AS INT) AS [User Link],
  PostHistory.Text AS PostClosureText
FROM PostHistory
WHERE PostHistoryTypeId = 10
ORDER BY PostHistory.CreationDate DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results