How many comments do I have for each score.
Q&A about the site for members of the workforce navigating the professional setting
DECLARE @UserId int = ##UserId## DECLARE @CommentCount int = COUNT(*) DECLARE @CommentScore int SELECT Count(*) AS CommentCount, @CommentScore AS Score, @CommentCount * @CommentScore AS [TotalScore] FROM Comments WHERE UserId = @UserId GROUP BY Score ORDER BY Score DESC