Users by total bounty given

1

Please login or register to vote for this query.

(click on this box to dismiss)

Returns, for each user, the total amount of reputation offered as bounty, the number of bounties offered, and current reputation, ordered by the total reputation offered.

Reverse Engineering Meta

Q&A about the site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation

SELECT TOP 100
  Votes.UserId AS [User Link],
  SUM(Votes.BountyAmount) AS BountyTotal,
  COUNT(Votes.BountyAmount) AS BountyNumber,
  MAX(Users.Reputation) AS Reputation,
  SUM(Votes.BountyAmount)+MAX(Users.Reputation) 
     AS 'rep plus bounties',
  100*SUM(Votes.BountyAmount)/(SUM(Votes.BountyAmount)+MAX(Users.Reputation))
     AS '% rep given',
  SUM(Votes.BountyAmount)/COUNT(Votes.BountyAmount)
     AS 'Avg bounty rep',
  100*COUNT(CASE WHEN Votes.UserId = questions.OwnerUserId THEN 1 END)/COUNT(Votes.BountyAmount)
     AS '% own Q',
  COUNT(CASE WHEN Votes.UserId = questions.OwnerUserId THEN 1 END) 
     AS 'No. own Q'
FROM
  Votes
  INNER JOIN Users ON Votes.UserId = Users.Id
  LEFT JOIN Posts questions ON Votes.PostId = questions.Id
WHERE
  Votes.VoteTypeId = 8 --BountyStart
  AND Votes.UserId > -1 --Remove Community user
  AND Users.Reputation > ##MinReputation?1##
GROUP BY
  Votes.UserId,
  Users.Id
HAVING 
  COUNT(Votes.BountyAmount) >= ##MinBountyNo?1##
ORDER BY
  SUM(Votes.BountyAmount) DESC

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results