Average question score for popular tags


Please login or register to vote for this query.

(click on this box to dismiss)


Q&A for researchers, developers, students, teachers, and end users interested in bioinformatics

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 > 0 --for popular tags only
and P.postTypeId = 1 --for questions only

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

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results