SearchTags

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

-- Good questions in given tags
-- Separate tags with `;`

DECLARE @TagName nvarchar(255) = '##TagName##'
SELECT TOP 100000 Posts.Id AS [Post Link],
           Tags.TagName, Posts.CreationDate, Posts.Score, Posts.ViewCount, Posts.Body, Posts.Title, Posts.Tags, Posts.AnswerCount, Posts.CommentCount, Posts.FavoriteCount
FROM Posts
INNER JOIN PostTags ON PostTags.PostId = Posts.Id
INNER JOIN Tags ON Tags.Id = PostTags.TagId
WHERE Tags.TagName IN
    (SELECT *
     FROM STRING_SPLIT(@TagName, ';'))
ORDER BY Posts.CreationDate DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results