with tag_list as ( SELECT p.postid, STRING_AGG(t.tagName,...

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

with tag_list as
(
SELECT p.postid, 
STRING_AGG(t.tagName, ',') WITHIN GROUP (ORDER BY t.tagName) AS tags
  FROM posttags p
  join tags t on p.tagid = t.id
  GROUP BY p.postid
 )
 select top 5 tags
 from tag_list
 group by tags
 order by count(*) desc;

Enter Parameters

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