top dup targets

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT
  MAX(L.RelatedPostId) AS [Post Link],
  SUM(CASE WHEN L.LinkTypeId = 3 THEN 1 ELSE 0 END) AS    DupLinkCount,
  SUM(CASE WHEN L.LinkTypeId = 1 THEN 1 ELSE 0 END) AS NonDupLinkCount,
  COUNT(*) AS AnyLinkCount
FROM PostLinks L
GROUP BY L.RelatedPostId
HAVING COUNT(*) > 100
ORDER BY DupLinkCount DESC

Enter Parameters

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