Number of Answers per Tag

0

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

select pt.TagId, t.TagName, count(pt.PostId)
from Posts q
  inner join Posts a on a.ParentId = q.Id
  inner join PostTags pt on pt.PostId = q.Id
  inner join Tags t on t.Id = pt.TagId
where q.PostTypeId = 1 -- Question
  and a.PostTypeId = 2 -- Answer
group by pt.TagId, t.TagName
order by Count(pt.PostId) desc

Enter Parameters

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