Find the highest-rep users whose combined reputation
is more than X% of the total user reputation.
Let's make Pareto proud.
Q&A about the site for software quality control experts, automation engineers, and software testers
-- Elite Users: Those who hold > X% of all Reputation
-- Find the highest-rep users whose combined reputation
-- is more than X% of the total user reputation.
-- Let's make Pareto proud.
DECLARE @MyAnswerUpped int = 0; -- +10
--@MyAnswerUpped = COUNT(*)
--select count(*) *10 as AnsRep, max(t1.Reputation) as TotRep ,t1.Id
select count(*) *10.0 / max(t1.Reputation) as TotRep ,t1.Id
INNER JOIN Votes ON Posts.Id = Votes.PostId
and Votes.VoteTypeId = 2 and Posts.PostTypeId = 2
INNER JOIN (
select Id, Reputation
where Reputation > 100000 and Reputation < 110000
)as t1 ON t1.Id = Posts.OwnerUserId
group by t1.Id