Q&A for professional and enthusiast programmers
-- Biggest UpVoters 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 FROM Users WHERE DownVotes > ##DownVotesGreaterThan:int?1## and UpVotes >= ##MinUpVotes:int?1## and Reputation >= ##MinReputation:int?50000## --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