Posts closed by the given user

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow на русском Meta

Вопросы и ответы о сайте для программистов

select postid as [Post Link],
  concat('site://posts/',
        postid,
        '/revisions'
        ) [Revisions Link]
     , crt.name
 --    , text
 --    , JSON_QUERY(text, '$.Voters')
     , cv.userid as [User Link]
from posthistory ph
inner join closereasontypes crt on crt.id = comment
cross apply OPENJSON(JSON_QUERY(ph.text, '$.Voters')) 
       with (userid int '$.Id') cv
where (posthistorytypeid = 10)
  AND (cv.userid=##UserId?8297##)
order by postid DESC

Enter Parameters

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