How many gain privileges

0

Please login or register to vote for this query.

(click on this box to dismiss)

Music Fans Meta

Q&A about the site for music historians, critics, and fans

with extra_rep as (
select Reputation + (select 5*count(*) 
                     from Posts q
                    join Votes v on PostId = q.Id
                     where PostTypeId = 1
                           and VoteTypeId = 3
                           and OwnerUserId = u.Id
                     ) rep,
       Reputation
from Users u
where u.Id in (select distinct OwnerUserId
               from Posts q
                    join Votes v on PostId = q.Id
               where PostTypeId = 1
                     and VoteTypeId = 3)
)

select count(*) "Cross threshold"
from extra_rep
where Reputation < ##threshold?15##
      and rep >= ##threshold##

Enter Parameters

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