Q&A for scientists using computers to solve scientific problems
WITH Rankings as ( Select ID,Ranking = row_number() over (order by Reputation desc) from users ) ,Counts as ( Select top 1000 count= count(*) From users Where Reputation >100 ) Select ID,Ranking,CAST(Ranking as Decimal(20,5))/(Select Count from Counts) from Rankings;