Q&A for Drupal developers and administrators
SELECT BountyAmount, AVG(Score) AS AverageScore, COUNT(*) AS NumPosts FROM Posts INNER JOIN Votes ON Posts.Id = Votes.PostId WHERE BountyAmount > 0 GROUP BY BountyAmount ORDER BY BountyAmount