Users with the best Up/Down Vote ratio

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS Meta

Q&A about the site for administrators, end users, developers and designers for Craft CMS

DECLARE @MinUpVotes int = ##MinUpVotes##
DECLARE @MinDownVotes int = ##MinDownVotes##

SELECT TOP 10 
    Id as [User Link],
    UpVotes,
    DownVotes,
    CAST((CAST(UpVotes AS float) / (CASE WHEN DownVotes = 0 THEN 1 ELSE CAST(DownVotes AS float) END)) AS int) AS UpVoteRatio
FROM Users
WHERE UpVotes > @MinUpVotes
AND DownVotes > @MinDownVotes
ORDER BY UpVoteRatio DESC

Enter Parameters

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