Average votes for all popular tags

1

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Ubuntu

Q&A for Ubuntu users and developers

-------------------------
-- @author: Moradnejad --
-------------------------
SELECT TagName, CNT, Score
FROM (
  SELECT TagName, count(*) as CNT, AVG(Cast(Score as Float)) as Score
    FROM (
      SELECT p.id, T.TagName, p.Score
      from posts as p
      inner join PostTags as pt on pt.PostId=p.Id
      inner join Tags as t on t.Id=pt.TagId
    ) as t1
  group by TagName
  ) as t2
WHERE CNT>30000
order by Score desc

Enter Parameters

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