Tags and Top 25 Related Tags

0

Please login or register to vote for this query.

(click on this box to dismiss)

Web Applications

Q&A for power users of web applications

select * from (SELECT  
  ROW_NUMBER() OVER(PARTITION BY A.ID ORDER BY A.ID, count(B.TagName) DESC) AS Row,
  A.ID, A.TagName as Tag1, B.TagName as Tag2, count(B.TagName) as cnt, A.TagName as TagName
 FROM 
  Tags as A, Tags as B, PostTags as C, PostTags as D
 WHERE   
  (A.TagName='directions') and
  (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 <= 10 and cnt>5 order by Tag1 asc

Enter Parameters

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