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

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
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
),

z as (
select
A.TagName as RowTagName,
B.TagName ColTagName,
count(distinct A.PostId) as N
from x  A
inner join x B
on A.PostId = B.PostId
group by A.TagName, B.TagName
)

select 
RowTagName
from 
z

Enter Parameters

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