Average score for questions and answers, by tag (with > N questions)


Please login or register to vote for this query.

(click on this box to dismiss)

For all canonical tags, what is the average question score and the average answer score?


Q&A for committed Christians, experts in Christianity and those interested in learning more

SELECT 'site://questions/tagged/' + CAST(Tags.TagName AS NVARCHAR) + '|' + CAST(Tags.TagName AS NVARCHAR) AS [Tag]
     , AVG(Answers.Score) AS [Average Score]
     , STDEV(Answers.Score) AS [Score StdDev]
     , COUNT(Answers.Id) AS [# Answers]
    FROM Tags
        INNER JOIN PostTags
            ON PostTags.TagId=Tags.Id
        INNER JOIN Posts AS Questions
            ON Questions.Id=PostTags.PostId
        INNER JOIN Posts AS Answers
            ON Answers.ParentId=Questions.Id
    GROUP BY Tags.Id, Tags.TagName
    ORDER BY 2 DESC, 3, 1

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results