Shows which tags bring in the most viewers
Q&A for those who study, teach, research and apply economics and econometrics
-- Top Tags by Median ViewCount -- See For Median http://stackoverflow.com/q/1342898/275404 SELECT Tags.tagName, avg(PostScore.Score) AS [Average Score], Count(*) AS [Question Count] FROM Posts INNER JOIN PostTags ON Posts.Id = PostTags.PostId INNER JOIN Tags ON PostTags.TagId = Tags.Id INNER JOIN (Select Votes.PostId, sum(case VoteTypeId when 2 then 1 else -1 end) as score From Votes Where VoteTypeId in (2,3) group by Votes.PostId) as PostScore ON PostScore.PostId = Posts.Id GROUP BY Tags.tagName having Count(*) >= 20 ORDER BY [Average Score] DESC