DECLARE @UserId int; set @UserID = 243896; Select *, (Po...

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 @UserId int; 
set @UserID = 243896;   
 
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