Newer Users with More Reputation Than Me

0

Please login or register to vote for this query.

(click on this box to dismiss)

Find useres that have been members for a shorter time than me but have more reputation points.

Constructed Languages

Q&A for designers and users of artificial or invented languages, consciously developed instead of having developed naturally

-- Newer Users with More Reputation Than Me
-- Find users that have been members for a shorter time than me
-- but have more reputation points.


declare @UserId int = ##UserId:int##

select u.id as [User Link],
    u.Reputation,
    u.Reputation - me.Reputation as RepDifference,
    DATEDIFF(SECOND, me.CreationDate, u.CreationDate) as DateDifference
from users u cross join users me
where me.id = @UserId
and u.CreationDate > me.CreationDate
and u.Reputation > me.Reputation

Enter Parameters

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