Top duplicate closevoters

1

Please login or register to vote for this query.

(click on this box to dismiss)

Ukrainian Language Meta

Q&A about the site for linguists, teachers and students of the Ukrainian language

--
--modification of rene's query
;with closevoters_rank as
(
select row_number() over(order by count(*) desc) [row]
     , userid
     , count(*) as cnt
from
(
select json_value(text, concat('$.Voters[', keys.value, '].Id')) userid
      , postid
from posthistory
cross apply string_split('0,1,2,3,4',',') keys
where posthistorytypeid = 10 and comment=101 -- closed as duplicate
) closevoters
where userid is not null
and userid > 0
group by userid
)

select '.'
     , row
     , 'site://users/' + userid + '|' + u.displayname
     , cnt
from closevoters_rank
inner join users u on u.id = userid
order by 1, 2

Enter Parameters

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