Tags and their synonyms

0

Please login or register to vote for this query.

(click on this box to dismiss)

Lifehacks

Q&A for people looking to bypass life's everyday problems with simple tricks

select 
  count(t.tagName), 
  string_agg(TagSynonyms.TargetTagName, ','),
  string_agg(TagSynonyms.SourceTagName, ','),
  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.SourceTagName = t.tagName or TagSynonyms.TargetTagName = t.tagName
group by t.tagName, e.body, w.body
order by  count(t.tagName) desc

Enter Parameters

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