Top 100 most recent posts in a the given tag

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS Meta

Q&A about the site for administrators, end users, developers and designers for Craft CMS

DECLARE @tagName nvarchar(35) = 'golang'

SELECT top 100
    Posts.Title,
    Tags.TagName,
    Posts.CreationDate,
    Posts.Body
FROM Tags
    INNER JOIN PostTags ON PostTags.TagId = Tags.Id
    INNER JOIN Posts ON Posts.Id = PostTags.PostId
WHERE Tags.TagName = @tagName
    AND Posts.CommunityOwnedDate IS NULL
ORDER BY CreationDate DESC

Enter Parameters

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