Rising stars, top 50 users ordered on rep per day

0

Please login or register to vote for this query.

(click on this box to dismiss)

Looking at the duration from when a user created their account till the last post, who gained the most rep per day

スタック・オーバーフロー

プログラマーとプログラミングに熱心な人々のための質問と回答

-- Rising stars, top 50 users ordered on rep per day
-- Looking at the duration from when a user created their account till
-- the last post, who gained the most rep per day

set nocount on

DECLARE @endDate date
SELECT @endDate = max(CreationDate) from Posts

set nocount off

SELECT TOP 150
    Id AS [User Link], Reputation, Days,
    Reputation/Days AS RepPerDays
FROM (
    SELECT *,
        CONVERT(int, @endDate - CreationDate) as Days
    FROM Users
) AS UsersAugmented
WHERE
    Reputation > 5000
ORDER BY
    RepPerDays DESC

Enter Parameters

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