Most frequently asked (not answered) questions

0

Please login or register to vote for this query.

(click on this box to dismiss)

Astronomy

Q&A for astronomers and astrophysicists

SELECT TOP ##Number## a.Id AS [Post Link], b.NumberOfDuplicates
FROM Posts AS a
LEFT JOIN
(SELECT Posts.Id, COUNT(PostLinks.RelatedPostId) AS NumberOfDuplicates
FROM Posts, PostLinks
WHERE Posts.Id = PostLinks.RelatedPostId AND PostLinks.LinkTypeId = 3
GROUP BY Posts.Id)
AS b ON a.Id = b.Id
ORDER BY b.NumberOfDuplicates DESC;

-- Number: Number of posts to show:

Enter Parameters

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