select * from Users.Users

0

Please login or register to vote for this query.

(click on this box to dismiss)

Anime and Manga

Q&A for anime and manga fans

with AllTags as

(
SELECT top 50 p.Id, replace(v.value, '>', '') as tag
FROM Posts  p
    CROSS APPLY STRING_SPLIT(Tags, '<') v  
    where replace(v.value, '>', '') <> '')

,SortedTags as(
SELECT a.Id, STRING_AGG(a.tag, ', ') WITHIN GROUP (ORDER BY a.tag ASC) AS SortedLine
FROM AllTags a
GROUP BY a.Id)

select SortedLine, count(Id)
from SortedTags
group by SortedLine

Enter Parameters

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