How much I gained through bounties


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

-- Bounty Amount Received per User
-- Questions where a user has received a Bounty Amount for their answer.

Declare @userId int

Set @UserId = ##UserId##

  COUNT(*) AS BountyCount, 
  SUM(v.BountyAmount) AS TotalBountyAmmount, 
  AVG(v.BountyAmount) AS AverageBountyAmmount
From Votes v
Join Posts p on v.PostId = p.Id
Where v.VoteTypeId = 9
And p.PostTypeId = 2
And p.OwnerUserId = @UserId

Enter Parameters

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