Upvotes as more than N% of votes

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE @PERCENT float = ##PERCENTUPVOTES##
DECLARE @MIN_VOTES int = ##MINVOTES##


SELECT 
  id as [User Link], 
  Reputation,
  UpVotes,
  DownVotes,
  (1.0*UpVotes/(1.0*UpVotes+1.0*DownVotes)) as PercentUp

from USERS

where 
  UpVotes>0 and 
  (1.0*UpVotes/(1.0*UpVotes+1.0*DownVotes)) > @PERCENT/100.0 and
  (UpVotes+DownVotes) > @MIN_VOTES

order by UpVotes desc

Enter Parameters

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