Some tag statistics

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
  TagName, 
  COUNT(p.Id)  as [Number of tagged Questions],
  MAX(p.Score) as [Maximum Score],
  MIN(p.Score) as [Minimum Score],
  AVG(p.Score) as Average,
  SUM(p.Score) as [Total Score]
FROM 
  Tags AS t
  INNER JOIN PostTags AS pt 
             ON pt.TagId = t.Id
  INNER JOIN Posts AS p     
             ON pt.PostId = p.Id
             AND p.PostTypeId = 1
GROUP BY
  t.TagName
ORDER BY
  [Total Score] DESC,
  Average DESC,
  [Number of tagged Questions] DESC

Enter Parameters

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