DECLARE @lastDataUpdate DATETIME SELECT @lastDataUpdate =...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Blender

Q&A for people who use Blender to create 3D graphics, animations, or games

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

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

FROM
 Users U

WHERE
 DATEDIFF(day,U.LastAccessDate,GETDATE()) < 30 AND
 (U.UpVotes + U.DownVotes) >= 100

ORDER BY
  DailyVotes DESC

Enter Parameters

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