Tags and Top 25 Related Tags

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mythology

Q&A for enthusiasts and scholars of mythology and folklore

select * from (SELECT  
  ROW_NUMBER() OVER(PARTITION BY A.ID ORDER BY A.ID, count(A.TagName) DESC) AS Row,
  A.ID, A.TagName as Tag1, B.TagName as Tag2, count(B.TagName) as cnt
 FROM 
  Tags as A, Tags as B, PostTags as C, PostTags as D
 WHERE   
  (C.PostId=D.PostId and C.TagId=A.id and D.TagId=B.id and A.id<>B.id) and 
  (a.id >= 1)
 GROUP BY
 A.ID,A.TagName,b.tagname) g where row <= 1 and cnt>5 order by Tag1 asc

Enter Parameters

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