select e.id, count(t.tagName), string_agg(TagSynonyms.Sou...

0

Please login or register to vote for this query.

(click on this box to dismiss)

The Workplace Meta

Q&A about the site for members of the workforce navigating the professional setting

select e.id,
  count(t.tagName),
  string_agg(TagSynonyms.SourceTagName, ',') as synonyms,
  t.tagName,
  e.body as 'Excerpt',
  w.body as 'WikiBody'
from tags t
left join Posts e
  on t.ExcerptPostId = e.Id
left join Posts w
  on t.WikiPostId = w.Id
left join TagSynonyms 
  on TagSynonyms.TargetTagName = t.tagName
group by t.tagName, e.body, w.body, e.id
order by  count(t.tagName) desc

Enter Parameters

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