Q&A about the site for students, teachers, and linguists wanting to discuss the finer points of the Italian language
-- messing around set nocount on DECLARE @endDate date SELECT @endDate = max(CreationDate) from Posts set nocount off ; -- why do i need this? WITH TOP200 AS ( SELECT TOP 200 *, DateDiff(Day, CreationDate, @endDate) as Days FROM Users ORDER By Reputation DESC ) SELECT Id AS [User Link], Reputation, Days, Reputation/Days AS RepPerDays FROM TOP200 ORDER BY Days ASC, Reputation DESC