Q&A for professional and enthusiast programmers
DECLARE @MinRep int = ##MinRep## DECLARE @MinDownVotes int = ##MinDownVotes## DECLARE @UserId int = ##UserId## SELECT Id as [User Link], UpVotes, DownVotes, Reputation, ROUND(1000*CAST(DownVotes AS float) / CAST(Reputation AS float), 3) AS DownToRepPermil, ROUND(100*CAST(DownVotes AS float) / CAST(UpVotes+DownVotes AS float), 3) AS DownVotesPercent FROM Users WHERE Id=@UserId OR (Reputation >= @MinRep AND DownVotes >= @MinDownVotes) ORDER BY DownToRepPermil ASC