All Questions Tagged With Both [Tag1] AND [Tag2]

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

DECLARE @TagId int = (
SELECT
  t.Id
FROM Tags t
WHERE t.TagName = ##TagName:string##
)

DECLARE @OtherTagId int = (
SELECT
  t.Id
FROM Tags t
WHERE t.TagName = ##OtherTagName:string##
)

SELECT
  CONCAT('site://q/', p.Id, '|', p.Title) AS [Post],
  p.CreationDate,
  p.Tags,
  p.Score
FROM PostTags ptg
JOIN PostTags otherTags ON otherTags.PostId = ptg.PostId
JOIN Posts p ON p.Id = ptg.PostId
WHERE ptg.TagId = @TagId AND otherTags.TagId = @OtherTagId
ORDER BY p.CreationDate DESC

-- TagName: Exact Name of Tag#1:
-- OtherTagName: Exact Name of Tag#2:

Enter Parameters

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