Count of dupe vs. count of exact dupes

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
  COUNT(*) AS DupeCount,
  COUNT(CASE WHEN Orig.Body = Dupe.Body THEN 1 END) AS SameDupeCount
FROM PostLinks, Posts Orig, Posts Dupe
WHERE
  PostLinks.LinkTypeId = 3
  AND
  Dupe.Id = PostLinks.PostId
  AND
  Orig.Id = PostLinks.RelatedPostId

Enter Parameters

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