Bounty Investors


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

 row_number() over (order by sum(v.BountyAmount) desc, u.Id)
,u.Id as [User Link]
,count(v.Id) as Bounties
,avg(v.BountyAmount) as [Average Spent]
,sum(v.BountyAmount) as [Total Spent]
,[Percent of Rep Spent] = format(1.0 * sum(v.BountyAmount) / nullif(sum(v.BountyAmount) + u.Reputation, 0.0), 'p3')
from Users as u
  join Votes as v
  on v.UserId = u.Id
  and v.VoteTypeId = 8 -- bountystart
where u.Id > 0
group by
order by
 [Total Spent] desc
offset ##OffsetRows:int?0## rows
fetch next ##ReturnRows:int?10## rows only;

-- OffsetRows: Number of rows to skip
-- ReturnRows: Number of rows to return

Enter Parameters

Switch to meta site
loading Hold tight while we fetch your results