Q&A about the site for serious players and enthusiasts of chess
declare @ownerId int set @ownerId = 365695 DECLARE @UserId int; set @UserID = 1; Select *, (Posts+Comments) as Total FROM (select sum(len(Body)) AS Posts FROM Posts where OwnerUserId = @UserId ) p, (select sum(len(Text)) AS Comments FROM Comments where UserId = @UserId ) c