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)

Audio-Video Production Meta

Q&A about the site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation

DECLARE @UserId int = ##UserId##
Select Count(*)
  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 = 342745 
   AND t.TagName in 
    (
      ##Tag1:string?android##
    )
group by t.TagName

Enter Parameters

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