How do I Rank Compared to Other Users

0

Please login or register to vote for this query.

(click on this box to dismiss)

Web Applications

Q&A for power users of web applications

-- How do I Rank Compared to Other Users
-- 

declare @UserId int = ##UserId##

select (count(*) + 1) as Rank, ((count(*) / 35) + 1) Page,
       (select reputation from users
        where id = @UserId) Reputation
from users
where reputation > (select u.reputation from users u where u.id = @UserId)

Enter Parameters

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