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

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

SELECT TOP 100
   SUM(V.BountyAmount) as 'Bounty Amount',
   COUNT(*) as 'Amount of Bounties',
   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',
   COUNT(*) as 'Amount of Bounties',
   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