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

Stack Overflow

Q&A for professional and enthusiast programmers

-- 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

With UsersAged AS (
  SELECT
    *,
    DATEDIFF(DAY, CreationDate, GETDATE()) AS AgeDays
  FROM
    Users
),
UsersRanked AS (
  SELECT
    *,
    (1.0*Reputation)/AgeDays AS RepRate
  FROM
    UsersAged
)
SELECT TOP 50
  ROW_NUMBER() OVER (ORDER BY RepRate DESC) AS Rank,
  Id AS [User Link], Reputation, AgeDays
FROM
  UsersRanked
WHERE
  Reputation > 200
ORDER BY
  Rank ASC

Enter Parameters

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