Tag Similarity by common occurance

0

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

select count(t1.postId) as count_match, t1.TagId, tag1.TagName, tag1.Count, t2.TagId, tag2.TagName, tag2.Count
from PostTags t1
  inner join PostTags t2 on t1.PostId=t2.PostId
  inner join Tags as tag1 on tag1.id = t1.TagId
  inner join Tags as tag2 on tag2.id = t2.TagId
  inner join Posts on t1.PostId = Posts.Id
  where t1.TagId<t2.TagId -- prevent double entries (symmetric)
  and Posts.score >=2 -- only consider tag combinations from posts having specific score
  and tag1.Count>10 -- only consider tags used ... times
  and tag2.Count>10 -- only consider tags used ... times
group by t1.TagId, t2.TagId, tag1.TagName, tag2.TagName, tag1.Count, tag2.Count
order by count_match desc

Enter Parameters

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