SELECT tag.TagName as Tag ,COUNT(1) as NumberOfPosts FROM...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Woodworking

Q&A for professional and amateur woodworkers

SELECT
	tag.TagName as Tag
	,COUNT(1) as NumberOfPosts
FROM Posts pst
    Inner Join PostTags ptag ON ptag.PostId = pst.Id
    Inner Join Tags tag ON tag.Id = ptag.TagId
WHERE UPPER(tag.TagName) in ('JAVA','CSS')
    and pst.Id IN (
        SELECT ptag.PostId
        FROM PostTags ptag
            Inner Join Tags tag ON tag.Id = ptag.TagId
        WHERE UPPER(tag.TagName) in ('JAVA','CSS')
    )
    and EXISTS (
        SELECT 1 FROM Comments com WHERE com.PostId = pst.Id
    )
GROUP BY tag.TagName
;

Enter Parameters

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