Nice persons (top 500 users ordered by profile views per day)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

SELECT  TOP 500
        ROW_NUMBER() OVER (ORDER BY [Views per Day] DESC) AS [#], *
FROM    (
        SELECT  u.Id AS [User Link], u.Views, u.Reputation, 1. * u.Views / DATEDIFF(d, CreationDate, GETDATE()) AS [Views per Day]
        FROM    Users u
        WHERE   u.Reputation >= 2000
        ) q
ORDER BY
        [Views per Day] DESC

Enter Parameters

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