top5relatedtags

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

SELECT TOP 5
   t1.TagName AS [Tag Link], t2.TagName AS [Tag Link], COUNT(pt1.PostId) AS [Post Count]
FROM PostTags pt1 
   JOIN PostTags pt2 ON pt1.PostId = pt2.PostId
   JOIN Tags t1 ON t1.Id = pt1.TagId
   JOIN Tags t2 ON t2.Id = pt2.TagId
WHERE t1.TagName < t2.TagName AND
    t1.TagName LIKE '%spring%'
GROUP BY t1.TagName, t2.TagName
ORDER BY COUNT(pt1.PostId) DESC

Enter Parameters

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