Posts with most links to them - only counting links from questions

0

Please login or register to vote for this query.

(click on this box to dismiss)

Amateur Radio

Q&A for amateur radio enthusiasts

SELECT TOP(##num?100##) 
  COUNT(pl.PostId) AS [Count],
  pl.RelatedPostId AS [Post Link]
FROM PostLinks pl INNER JOIN Posts q ON q.Id=pl.PostId
WHERE (pl.LinkTypeId=1) AND
  (q.PostTypeId=1) --only questions
GROUP BY pl.RelatedPostId
ORDER BY COUNT(pl.PostId) DESC

Enter Parameters

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