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

Craft CMS Meta

Q&A about the site for administrators, end users, developers and designers for Craft CMS

SELECT
   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 Users.Id = 22656
GROUP BY Users.Id, Users.DisplayName
ORDER BY AvgScore DESC

Enter Parameters

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