Ordered by total downvotes / (total upvotes + total downvotes)
Q&A for network engineers
-- Problem Users -- Ordered by total downvotes / (total upvotes + total downvotes) create table #TotalVotes(UserId int, Upvotes int, Downvotes int, Reputation int) insert into #TotalVotes (UserId, Reputation) select Id, Reputation from Users where Reputation > 1000 update t set Upvotes = ( select count(*) from Votes v join Posts p on v.PostId = p.Id where p.OwnerUserId = t.UserId and ClosedDate is null and CommunityOwnedDate is null and VoteTypeId = 2 ) , Downvotes = ( select count(*) from Votes v join Posts p on v.PostId = p.Id where p.OwnerUserId = t.UserId and ClosedDate is null and CommunityOwnedDate is null and VoteTypeId = 3 ) from #TotalVotes t select UserId as [User Link], Upvotes, Downvotes, Reputation from #TotalVotes order by (DownVotes / (Upvotes + Downvotes + 0.00001)) desc