SO by LOCATION Anywhere

3

Please login or register to vote for this query.

(click on this box to dismiss)

location, location, location

Interpersonal Skills

Q&A for people looking to improve their interpersonal communication skills

DECLARE @myPosts TABLE
(
Id int,
ParentId int,
OwnerUserId int,
Tags nvarchar(150)
)

DECLARE @myComments TABLE
(
Id int,
PostId int,
UserId int
)

INSERT INTO @myPosts (Id, ParentId, OwnerUserId, Tags)
SELECT Id, ParentId, OwnerUserId, Tags
FROM Posts p
WHERE p.tags LIKE '%java%'
    
INSERT INTO @myPosts (Id, ParentId, OwnerUserId, Tags)
SELECT Id, ParentId, OwnerUserId, Tags
FROM Posts p
WHERE p.posttypeid = 2 AND p.parentid IN (SELECT id from @myPosts)

INSERT INTO @myComments (Id, PostId, UserId)
SELECT Id, PostId, UserId
FROM Comments c
WHERE c.postid in (SELECT id from @myPosts)

SELECT COUNT(id)
FROM @myComments

Enter Parameters

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