Exercise 1

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS Meta

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

SELECT t.Id, TagName, AVG(Score) AS AvgScore
FROM (
  Posts AS p
  JOIN PostTags AS pt ON pt.PostId = p.Id
  JOIN Tags AS t ON t.Id = pt.TagId
)
WHERE Count>4
GROUP BY t.Id, TagName
ORDER BY AvgScore DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results