Rising new joinees getting more than 100 rep per day

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

-- Rising new joinees, top 50 users ordered on number of days from joining
-- and having at least 100 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 50
    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 AND (Reputation/Days) > 100
ORDER BY
    Days ASC

Enter Parameters

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