Q&A for professional mathematicians
SELECT t.TagName, AVG(CAST(p.Score AS decimal)) FROM Posts p INNER JOIN PostTags pt ON p.Id = pt.PostId INNER JOIN Tags t ON pt.TagId = t.Id WHERE t.Count>=##num?10## ---WHERE (p.PostTypeId IN (##types?1,2##) GROUP BY t.TagName ORDER BY AVG(CAST(p.Score AS decimal)) DESC