display the users ordered by decreasing reputation


Please login or register to vote for this query.

(click on this box to dismiss)


Q&A for scientific skepticism

SELECT Posts.Id, Posts.Title, x.Name, x.Max_score,
(Posts.Id - x.Earlier) / (x.Later - x.Earlier) AS Percentile
FROM Posts JOIN (SELECT PostTypes.Id AS Id, PostTypes.Name AS Name, 
                 max(Posts.Score) AS Max_score, 
                 min(Posts.Id) AS Earlier, max(Posts.Id) AS Later
                 FROM Posts JOIN PostTypes
                 ON Posts.PostTypeId = PostTypes.Id
                 GROUP BY PostTypes.Id, PostTypes.Name) AS x
ON Posts.PostTypeId = x.Id

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results