DECLARE @UserId int = 47773 Select *, (Posts+Comments) a...

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 = 47773

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