Practice Queries

0

Please login or register to vote for this query.

(click on this box to dismiss)

The Workplace Meta

Q&A about the site for members of the workforce navigating the professional setting

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

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

Enter Parameters

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