select t.id, t."count" as tagCount, string_agg(TagSynonym...

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,
t."count" as tagCount,
  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, t.id, t."count"
order by t.tagName asc
OFFSET  50000 ROWS
FETCH NEXT 50000 ROWS ONLY

Enter Parameters

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