Comment Leaderboard

2

Please login or register to vote for this query.

(click on this box to dismiss)

Gets the highest voted comments and their URLs on the site.

Stack Overflow

Q&A for professional and enthusiast programmers

-- Comment Leaderboard
-- Gets the highest voted comments and their URLs on the site.

SELECT TOP 10
c.Score as [Comment Score],
pt.Name as [Commented On],
c.Text as [Comment],
u.DisplayName as [Comment By],
c.PostId as [Post Link]
FROM Comments c, PostTypes pt, Posts p, Users u
WHERE p.Id = c.PostId
AND pt.Id = p.PostTypeId
AND u.Id = c.UserId
ORDER BY c.Score DESC

Enter Parameters

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