Upvoted posts for UserId with certain tag


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)

Interpersonal Skills

Q&A for people looking to improve their interpersonal communication skills

DECLARE @UserId int = ##UserId##
Select Count(*)
  FROM Users u
   JOIN Posts p ON p.OwnerUserId = u.Id
   JOIN PostTags pt ON pt.PostId = p.Id
   JOIN Tags t  ON t.Id = pt.TagId
  where u.Id = @UserId 
   AND t.TagName in 
group by t.TagName

Enter Parameters

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