Highest percentage of reputation offered as bounties

1

Please login or register to vote for this query.

(click on this box to dismiss)

Joomla Meta

Q&A about the site for Joomla! administrators, users, developers and designers

--Based on https://data.stackexchange.com/mathoverflow/revision/372216/479627/top-20-most-generous-users-bounties-awarded
--And on https://data.stackexchange.com/math/query/962775/user-with-highest-amount-of-offered-bounties?num=100&min=50

;with bounties_cte AS (
SELECT
  Users.Id AS uid,
  Users.DisplayName AS udn,
  Users.Reputation AS rep,
  (SELECT SUM(BountyAmount) FROM Votes WHERE Votes.UserId = Users.Id) as TotalBountiesAwarded
FROM Users
WHERE
---  (SELECT SUM(BountyAmount) FROM Votes WHERE Votes.UserId = Users.Id) > 0 -- ensure a bounty has been awarded
  -- exclude Community and sin binned users
  -- minimum amount here to qualify for this?
---  AND 
  Users.Reputation >= ##min?50## 
)

SELECT TOP(##num?100##)
  RANK() OVER(ORDER BY ROUND((CAST(TotalBountiesAwarded AS decimal))*100.0/(CAST(rep+TotalBountiesAwarded AS decimal)),2) DESC) AS Rank,
  uid AS [User Link],
  ROUND((CAST(TotalBountiesAwarded AS decimal))*100.0/(CAST(rep+TotalBountiesAwarded AS decimal)),2) AS percentage,
  rep AS Reputation,
  TotalBountiesAwarded,
  url = 'site://users/' + CAST(uid AS varchar) + '?tab=bounties&sort=offered'
FROM  
  bounties_cte
WHERE TotalBountiesAwarded>=##minbounties?1000##  
ORDER BY 
  ROUND((CAST(TotalBountiesAwarded AS decimal))*100.0/(CAST(rep+TotalBountiesAwarded AS decimal)),2)
DESC

Enter Parameters

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