declare @ownerId int set @ownerId = 365695 DECLARE @UserI...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Chess Meta

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

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results