Users by total bounty given

0

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.

Engineering

Q&A for professionals and students of engineering

SELECT
  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 'Reputation plus bounties',
  SUM(Votes.BountyAmount)/(SUM(Votes.BountyAmount)+MAX(Users.Reputation))
     AS '% Reputation given'
FROM
  Votes
  INNER JOIN Users ON Votes.UserId = Users.Id
WHERE
  Votes.VoteTypeId = 8 --BountyStart
  AND Votes.UserId > -1 --Remove Community user
GROUP BY
  Votes.UserId,
  Users.Id
ORDER BY
  BountyTotal DESC

Enter Parameters

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