My comments, ordered by score (Pundit badge progress)

10

Please login or register to vote for this query.

(click on this box to dismiss)

My Comments, ordered by Score 2

Ask Ubuntu

Q&A for Ubuntu users and developers

-- My comments, ordered by score (Pundit badge progress)

DECLARE @UserId int = ##UserId##

SELECT 
    Comments.Score,
    Comments.Id as [Comment Link],
    -- PostId as [Post Link],
    /*CASE 
    WHEN Q.Id is not NULL THEN CONCAT("<a href=\"http://stackoverflow.com/a/", Posts.Id, "\">", Q.Title, "</a>")
          ELSE CONCAT("<a href=\"http://stackoverflow.com/q/", Posts.Id, "\">", Posts.Title, "</a>") 
    END as QTitle,*/
    -- PostId,
    -- Posts.ParentId,
    Comments.CreationDate
FROM 
    Comments /*join Posts on Comments.PostId = Posts.Id
        left join Posts as Q on Posts.ParentId = Q.Id*/
WHERE 
    UserId = @UserId and Comments.Score > 0
ORDER BY 
    Comments.Score DESC

Enter Parameters

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