Tags by average number of views per post

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT t.TagName, AVG(p.ViewCount) AS Views
  FROM Posts p 
JOIN PostTags pt
  ON p.Id = pt.PostId
JOIN Tags t
  ON pt.TagId = t.id
GROUP BY t.TagName 
ORDER BY Views DESC

Enter Parameters

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