with x as ( select top 100 Posts.Id as PostId, Tags.TagName

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 x as (
select
top 100
Posts.Id as PostId,
Tags.TagName
from Posts
left join PostTags
on PostTags.postId = Posts.Id
left join Tags
on Tags.Id = PostTags.TagId
where Posts.PostTypeId = 1
)

select
A.TagName, 
B.TagName,
count(distinct A.PostId) as N
from x  A
inner join x B
on A.PostId = B.PostId
group by A.TagName, B.TagName
order by 3 desc

Enter Parameters

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