Question counts per tag

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 AS TagName,
Count(q.Id) AS QuestionCount,
t.Count,
Count(q.Id)-t.Count
FROM Posts q
  INNER JOIN PostTags pt ON q.Id = pt.PostId
  INNER JOIN Tags t ON pt.TagId = t.Id
GROUP BY t.TagName, t.Count  
ORDER BY t.Count DESC

Enter Parameters

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