Which tags attract posters with the highest average reputation?
Q&A for professional and enthusiast programmers
-- Highbrow Tags -- Which tags attract posters with the highest average reputation? set nocount on select t.TagName, Reputation = avg(u.Reputation + 0.0), t.Count from Posts p join Posts p1 on p1.ParentId = p.Id join Users u on p1.OwnerUserId = u.Id join PostTags pt on pt.PostId = p.Id join Tags t on t.Id = pt.TagId where t.Count > 5 -- AND p.PostTypeId = 1 group by t.TagName, t.Count order by Reputation DESC set nocount off