Average question score for popular tags

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select T.tagName, 
       T.count as tagCount, 
       sum(P.score) / cast(count(P.score) as decimal) as avgScore

from Tags T
join PostTags PT
on PT.tagId = T.id

join Posts P 
on P.id = PT.postId
where T.count > 200000 --for popular tags only
and P.postTypeId = 1 --for questions only

group by T.tagName, T.count
order by avgScore desc

Enter Parameters

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