Close stats for top dup-hammer users


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select  hc.PostId as [Post Link], hr.CreationDate 'Reopened at'
---, JSON_value(hr.text, '$.Voters[0].DisplayName') 'Reopened by'

from PostHistory as hc

left join PostHistory hr on hr.PostId=hc.PostId 
and hr.CreationDate > hc.CreationDate and hr.PostHistoryTypeId=11

cross join string_split('0,1,2,3,4,5',',')

where hc.PostHistoryTypeId=10
and hc.Comment like '101%'
and hc.Text like '%BindingReason":{"GoldTagBadge%'
and JSON_value(hc.text, '$.Voters['+value+'].Id') is not null
and JSON_value(hc.text, concat('$.Voters[',

     (select min(value) -1 from
        (select value,
            JSON_VALUE(text, concat('$.Voters[',value,'].Id')) closevoteruserid
          from PostHistory as p
          cross join string_split('0,1,2,3,4,5,6,7',',')
          where p.PostHistoryTypeId = 10
          and p.PostId=hc.PostId
        ) data
        where closevoteruserid is null

     , '].Id')) = '##userid:int##'

order by hc.CreationDate desc

Enter Parameters

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