Upvoted posts for UserId with certain tag

0

Please login or register to vote for this query.

(click on this box to dismiss)

Load all posts a certain user upvoted and filter by tag (tag1)

Aviation

Q&A for aircraft pilots, mechanics, and enthusiasts

DECLARE @UserId int = ##UserId##
Select p.Id, p.Title, p.Tags, t.TagName
  FROM Users u
   JOIN Votes v ON u.Id = v.UserId
   JOIN Posts p ON p.Id = v.PostId
   JOIN PostTags pt ON pt.PostId = p.Id
   JOIN Tags t  ON t.Id = pt.TagId
  where u.Id = 819887 
   AND t.TagName in 
    (
      ##Tag1:string?linq##
    )

Enter Parameters

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