Average question score for popular tags

0

Please login or register to vote for this query.

(click on this box to dismiss)

Russian Language

Q&A for students, teachers, and linguists wanting to discuss the finer points of the Russian language

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