Tag along tags

0

Please login or register to vote for this query.

(click on this box to dismiss)

Count of tags which accompany a given tag (enter tag name in lower case)

Stack Overflow

Q&A for programmers

-- Enter Query Title
-- Enter Query Description
select tagname,count(tagname) from
tags t inner join PostTags pt on t.id=pt.tagid
inner join posts p on p.id=pt.PostId
where p.id in (
select p.id from
tags t inner join PostTags pt on t.id=pt.tagid
inner join posts p on p.id=pt.PostId
where tagname='core'
)
group by tagname
order by 2 desc

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached