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;