Sherman Ng Question 5

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

SELECT
    STRING_AGG(Tags.TagName, ', ') AS Tags, 
    COUNT(Tags.TagName) AS NumberOfTags, 
    Posts.Id AS PostId, 
    Posts.OwnerUserId AS UserId,
    Posts.Body AS PostBody
FROM 
    Posts
JOIN 
    PostTags ON Posts.Id = PostTags.PostId
JOIN 
    Tags ON PostTags.TagId = Tags.Id
WHERE 
    Posts.PostTypeId = 1
GROUP BY 
    Posts.Id, 
    Posts.OwnerUserId, 
    Posts.Body
HAVING 
    COUNT(Tags.TagName) >= 5;

Enter Parameters

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