Question 5

0

Please login or register to vote for this query.

(click on this box to dismiss)

Quantum Computing Meta

Q&A about the site for engineers, scientists, programmers, and computing professionals interested in quantum computing

WITH PostTagCounts AS (
    SELECT 
        P.Id AS PostId,
        P.OwnerUserId AS UserId,
        P.Body AS PostBody,
        COUNT(PT.TagId) AS NumberOfTags
    FROM Posts P
    JOIN PostTags PT ON P.Id = PT.PostId
    GROUP BY P.Id, P.OwnerUserId, P.Body
    HAVING COUNT(PT.TagId) >= 5 
)
SELECT 
    STRING_AGG(T.TagName, ',') AS Tags,
    PTC.NumberOfTags,
    PTC.PostId,
    PTC.UserId,
    PTC.PostBody
FROM PostTagCounts PTC
JOIN PostTags PT ON PTC.PostId = PT.PostId
JOIN Tags T ON PT.TagId = T.Id
GROUP BY PTC.PostId, PTC.UserId, PTC.PostBody, PTC.NumberOfTags;

Enter Parameters

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