Q&A about the site for practitioners of the art and science of signal, image and video processing
-- StackOverflow Rank and Percentile WITH Rankings AS ( SELECT Id, Ranking = ROW_NUMBER() OVER(ORDER BY Reputation DESC), DisplayName FROM Users ) ,Counts AS ( SELECT Count = COUNT(*) FROM Users WHERE Reputation > 100 ) SELECT Id, DisplayName, Ranking, CAST(Ranking AS decimal(20, 5)) / (SELECT Count FROM Counts) AS Percentile FROM Rankings WHERE Id = ##UserId##