Top tags by highest average answer score

1

Please login or register to vote for this query.

(click on this box to dismiss)

Drupal Answers Meta

Q&A about the site for Drupal developers and administrators

SELECT
  t.TagName,
  AVG(CAST(a.Score AS decimal))
FROM Posts q INNER JOIN Posts a ON a.ParentId=q.Id
  INNER JOIN PostTags pt ON q.Id = pt.PostId
  INNER JOIN Tags t ON pt.TagId = t.Id
WHERE t.Count>=##num?10##  
GROUP BY t.TagName
ORDER BY AVG(CAST(a.Score AS decimal)) DESC

Enter Parameters

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