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.
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', 100*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