Avgerage Upvotes per Answer

0

Please login or register to vote for this query.

(click on this box to dismiss)

Average number of upvotes per answer

Italian Language Meta

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

-- Avgerage Upvotes per Answer
-- Average number of upvotes per answer

SELECT
   TOP 20
   Users.Id,
   Users.DisplayName,
   COUNT(Posts.Id) As NumPosts,
   SUM(Posts.Score) As SumScore,
   AVG(Posts.Score) As AvgScore
FROM Posts
INNER JOIN Users ON Posts.OwnerUserID = Users.Id
WHERE Posts.PostTypeID = 2
AND Posts.ParentId IN (
-- Posts with a particular tag
SELECT
Posts.Id
FROM Posts
INNER JOIN PostTags ON Posts.Id = PostTags.PostId
INNER JOIN Tags ON PostTags.TagId = Tags.Id
WHERE Posts.PostTypeID = 1
AND Tags.TagName = '##tagname##'
)

GROUP BY Users.Id, Users.DisplayName

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results