declare @UserId int = ##UserId## declare @MyReputation int

0

Please login or register to vote for this query.

(click on this box to dismiss)

Bicycles Meta

Q&A about the site for people who build and repair bicycles, people who train cycling, or commute on bicycles

declare @UserId int = ##UserId##

declare @MyReputation int
select @MyReputation =  Reputation
from Users
where Id = @UserId

declare @Position int
select @Position = count(*) + 1
from Users
where Reputation > @MyReputation

declare @UserCount int
select @UserCount = count(*)
from Users

declare @Percentile float = @Position / @UserCount * 100

select @MyReputation Rep, @Position Pos, @UserCount Users, @Percentile Pct

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results