Most frequent voters, active in last year

1

Please login or register to vote for this query.

(click on this box to dismiss)

Modified from DMA57361's query (28276).

Musical Practice and Performance

Q&A for musicians, students, and enthusiasts

-- Top 100 Most Frequent Voters
-- The top 100 users based on the number of votes cast per day

DECLARE @lastDataUpdate DATETIME
SELECT @lastDataUpdate = MAX(CreationDate) FROM Posts

SELECT TOP 100
 U.Id AS [User Link],
 U.UpVotes,
 U.DownVotes,
 (U.UpVotes + U.DownVotes) AS TotalVotes,
-- U.UpVotes/(U.UpVotes + U.DownVotes) AS UpvotePercentage,
 ROUND(CAST((U.UpVotes + U.DownVotes) AS FLOAT) / (DateDiff(day,U.CreationDate,@lastDataUpdate)+1),2) AS VotesPerDay

FROM
 Users U

WHERE
 DATEDIFF(day,U.LastAccessDate,GETDATE()) < 30

ORDER BY
  VotesPerDay DESC

Enter Parameters

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