select t.TagName, count(t.TagName) as numberOfQuestion fr...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Vegetarianism

Q&A for those committed to a vegan or vegetarian lifestyle and anyone interested in learning more

select t.TagName, count(t.TagName) as numberOfQuestion
from Posts pos
join (select p.Id, count(p.Id) as tagsNum
  from PostTags pt
  join Posts p
    on pt.PostId = p.Id
  group by p.Id) tab
  on tab.Id = pos.id
join PostTags pt
  on pt.PostId = pos.Id
join Tags t
  on pt.TagId = t.Id
where tab.tagsNum = 1
group by t.TagName
order by numberOfQuestion desc

Enter Parameters

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