Skip to main content
3 of 5
added 338 characters in body
yivi
  • 46.9k
  • 30
  • 217
  • 297

These are the answers that earnt the most reputation with bounties:

SELECT TOP 100
   SUM(V.BountyAmount) as 'Bounty Amount',
   V.PostId AS [Post Link]
FROM
   Votes V 
INNER JOIN Posts P ON P.id = V.PostId
WHERE
   P.PostTypeId = 2 AND V.VoteTypeId=9 
GROUP BY V.PostId
ORDER BY 'Bounty Amount' desc

And these are the questions where most reputation has been spent in bounties:

SELECT TOP 100
   SUM(V.BountyAmount) as 'Bounty Amount',
   V.PostId AS [Post Link]
FROM
   Votes V 
INNER JOIN Posts P ON P.Id = V.PostId
WHERE
   P.PostTypeId = 1 AND V.VoteTypeId=8 
GROUP BY V.PostId
ORDER BY 'Bounty Amount' desc
yivi
  • 46.9k
  • 30
  • 217
  • 297