Comments with highest score

1

Please login or register to vote for this query.

(click on this box to dismiss)

This ranks the top 100 comments on the site. Note: can also be filtered to the top 100 comments of a certain user, if an ID is provided. Leave default '0' for 'all' comments.

Science Fiction and Fantasy

Q&A for science fiction and fantasy enthusiasts

--User: User ID to RanK: "Enter 1 if you want to rank ALL users

SELECT TOP 100 
RANK() OVER (ORDER BY C.Score DESC) AS Rank,
C.Id AS [Comment Link],
U.Id AS [User Link],
C.Score
FROM Comments C
  INNER JOIN Users U
    ON C.UserId = U.Id
WHERE (U.Id = ##User:int?1## OR NULLIF(##User:int?1##, 1) IS NULL)
ORDER BY C.Score DESC

Enter Parameters

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