Get posts by tag

1

Please login or register to vote for this query.

(click on this box to dismiss)

Space Exploration

Q&A for spacecraft operators, scientists, engineers, and enthusiasts

DECLARE @Tag nvarchar(25) = 'geotools';

SELECT 
  Posts.Id , Posts.Title, Posts.Body
FROM Tags
  INNER JOIN PostTags ON PostTags.TagId = Tags.Id
  INNER JOIN Posts ON Posts.Id = PostTags.PostId
WHERE
  Tags.TagName = @Tag AND
  Posts.PostTypeId = 1 -- Questions
ORDER BY Posts.CreationDate DESC

Enter Parameters

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