2

I recently won a 'Pundit' badge for having 10 comments with a score of +5 or more. I then proceeded to waste more time than I'm comfortable admitting to trying to find which comments were well liked enough to bolster my ego.

There is no way that I can see to sort comments by number of upvotes on the profile page. Is there any way to do this? I know there is an API somewhere, but I don't know how to use it yet.

I found "When will my highest-voted comments appear in my profile?", but it doesn't seem to have made it into the shiny new profile revamp either.

4

2 Answers 2

4

If you can wait till sunday, because that is when SEDE gets updated, you can run this query

select id as [Comment Link]
, postid as [Post Link]
, score
from comments
where userid = ##userid##
order by score desc

Notice the two Magic Link columns I used, [Comment Link] and [Post Link], to have SEDE generate links to the comment and your post.

1

I found the My Comment Score distribution query and came up with this basic extension (that I'm sure someone has done before me).

DECLARE @UserId int = ##UserId##

SELECT 
    Id,
    PostId,
    Text,
    Score
FROM 
    Comments
WHERE 
    UserId = @UserId
ORDER BY 
    Score DESC

If someone can suggest an improvement, there are two things I would like to add:

  • Post title – can't figure out how to join
  • Link to comment – can't figure out how to link to a comment by comment ID only – it appears to need the post Id and/or title url. I also haven't found whether or not there's support for text operations.

Not the answer you're looking for? Browse other questions tagged .