Sum of scores
Q&A for computer enthusiasts and power users
-- My score for a tag -- Sum of scores DECLARE @user int = ##UserId## --DECLARE @tagname varchar = ##Tag## select t.TagName as 'Tag', SUM(p.Score) as 'Votes' from Posts p, Tags t, PostTags pt where p.OwnerUserId = @user and p.ParentId = pt.PostId and t.Id = pt.TagId and t.TagName = 'c' group by t.TagName