Tag Similarity by common occurance

0

Please login or register to vote for this query.

(click on this box to dismiss)

Computational Science

Q&A for scientists using computers to solve scientific problems

select count(t1.postId) as count_match, t1.TagId as TagId1, tag1.TagName as TagName1, tag1.Count as Count1, t2.TagId as TagId2, tag2.TagName as TagName2, tag2.Count as Count2
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