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.

Physics

Q&A for active researchers, academics and students of physics

SELECT TOP 200
  PostHistory.PostId AS [Post Link],
--  PostHistory.CreationDate,
--  PostHistory.UserId,
--  PostHistory.Comment,
  CHARINDEX('"Voters":[{"Id":',PostHistory.Text) AS 'aaaaa',
  CHARINDEX(',"DisplayName"',PostHistory.Text) AS 'bbbbb',
  
--  SUBSTRING(PostHistory.Text, 
--  CHARINDEX('"Voters":[{"Id":',PostHistory.Text)+16,500),
  
  
  SUBSTRING(
     PostHistory.Text, 
     CHARINDEX('Voters',PostHistory.Text)+14,
     CHARINDEX('Display',  PostHistory.Text)
       -CHARINDEX('Voters',PostHistory.Text)-15
     ),
  
--  LEFT( SUBSTRING(PostHistory.Text, 
--  CHARINDEX('"Voters":[{"Id":',PostHistory.Text)+0,500), 
--  CHARINDEX(',"Display',  PostHistory.Text)+0 ),
  PostHistory.Text
FROM PostHistory
WHERE PostHistoryTypeId = 10
ORDER BY PostHistory.CreationDate DESC

Enter Parameters

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