Q&A for scientists using computers to solve scientific problems
SELECT TOP(##num?500##) p.OwnerUserId AS [User Link], t.TagName, p.OwnerDisplayName, SUM(bs.BountyAmount) AS [Rep from bounties], COUNT(bs.BountyAmount) AS [Number of bounties] FROM Posts p INNER JOIN Votes bs ON (p.Id = bs.PostId) AND (bs.VoteTypeId = 9) -- BountyClose INNER JOIN PostTags pt ON p.ParentId = pt.PostId INNER JOIN Tags t ON pt.TagId = t.Id GROUP BY p.OwnerUserId, p.OwnerDisplayName, t.TagName ORDER BY SUM(bs.BountyAmount) DESC