Q&A for administrators, end users, developers and designers for Craft CMS
-- Possible socks: users with low reputation and lots of votes SELECT TOP ##MaxNumUsers:int?100## ROW_NUMBER() OVER(ORDER BY Reputation DESC) AS [# by Rep], Id as [User Link], ROW_NUMBER() OVER(ORDER BY DownVotes DESC) AS [# by DownVotes], UpVotes as [Up Votes], DownVotes [Down Votes], UpVotes - DownVotes as [Net Votes], ROUND((100.0 * UpVotes / (UpVotes + DownVotes) ), 2) as [Up Votes PCT], Reputation, CreationDate as [Created], LastAccessDate as [Last Visited] FROM Users WHERE UpVotes >= ##MinUpVotes:int?1## and DownVotes >= ##MinDownVotes:int?0## and Reputation <= ##MaxReputation:int?666## and Reputation >= ##MinReputation:int?15## --ORDER BY [Down Votes PCT] DESC, [Net Votes] DESC -- Alternate ordering --ORDER BY [Net Votes] ASC, [Down Votes PCT] DESC ORDER BY [Up Votes PCT] DESC, [Up Votes] DESC