Get the tags that are used frequently together for a given tag

0

Please login or register to vote for this query.

(click on this box to dismiss)

With inputs from this questions : https://meta.stackoverflow.com/questions/397374/query-the-tags-that-appear-together-frequently

Stack Overflow

Q&A for professional and enthusiast programmers

select tt.tagname, count(*) [count] 
from posttags pt -- tags on posts
inner join tags st on st.id = pt.tagid -- selection tag
inner join posttags ptt on ptt.postid = pt.postid -- other tags
inner join tags tt on tt.id =  ptt.tagid -- other tag names
where st.tagname = ##tagname:string?teradata##
and tt.tagname <> ##tagname:string?teradata##
group by tt.tagname
order by count(*) desc

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results