instruction: Reputation gain for each tag on SO.
response: SELECT t.TagName AS TAG, SUM(q.Score) * 5 + SUM(a.Score) * 10 AS TOTAL_REPUTATION FROM Tags AS t JOIN PostTags AS pt ON t.Id = pt.TagId JOIN Posts AS q ON pt.PostId = q.Id JOIN Posts AS a ON q.Id = a.ParentId WHERE q.PostTypeId = 1 AND a.PostTypeId = 2 GROUP BY t.TagName ORDER BY TOTAL_REPUTATION DESC