Top-ranked comments

0

Please login or register to vote for this query.

(click on this box to dismiss)

The 50 highest ranked comments with post links. Ignores comments on posts that have been migrated as this is unfair to poor little sites with lots of StackOverflow migrations.

Stack Overflow

Q&A for professional and enthusiast programmers

-- Top-ranked comments
-- The 50 highest ranked comments with post links.  Ignores comments on posts
-- that have been migrated as this is unfair to poor little sites with lots of
-- StackOverflow migrations.

SELECT TOP 50
ROW_NUMBER() OVER (ORDER BY
  Comments.Score DESC) as '#',
Comments.PostId as [Post Link],
Comments.UserId as [User Link],
Comments.Score,
Comments.Text
FROM
  Comments
WHERE
  NOT EXISTS (SELECT * FROM PostHistory WHERE PostId = Comments.PostId AND PostHistoryTypeId=17)
ORDER BY
  Comments.Score DESC

Enter Parameters

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