Average Score per Tag

3

Please login or register to vote for this query.

(click on this box to dismiss)

Shows which tags bring in the most viewers

Audio-Video Production Meta

Q&A about the site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation

-- 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

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results