Most frequent duplicate targets

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mathematics

Q&A for people studying math at any level and professionals in related fields

;with counts_cte AS (SELECT
  RelatedPostId AS id,
  COUNT(PostId) AS count
FROM PostLinks
WHERE (LinkTypeId=3)
GROUP BY RelatedPostId
---LinkTypeId type of link
---1 = Linked (PostId contains a link to RelatedPostId)
---3 = Duplicate (PostId is a duplicate of RelatedPostId)
)


SELECT TOP(##num?500##)
  p.Id AS [Post Link],
  c.count,
  p.Score,
  p.ViewCount,
  p.AnswerCount
FROM counts_cte c INNER JOIN Posts p ON p.id=c.id
WHERE p.Tags LIKE '##tag##'
ORDER BY c.count DESC

Enter Parameters

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