select t.id, count(t.tagName) as synonym_count, string_ag...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select t.id,
  count(t.tagName) as synonym_count,
  string_agg(TagSynonyms.SourceTagName, ',') as synonyms,
  t.tagName,
  concat('stackoverflow.com/tags/',t.tagName ,'/info')
from tags t
left join TagSynonyms 
  on TagSynonyms.TargetTagName = t.tagName
group by t.tagName, t.id
order by  count(t.tagName) desc

Enter Parameters

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