Filter my favourite questions by tags relating to : http://meta.stackoverflow.com/questions/266029/tag-filter-for-favourite-questions
Q&A for professional and enthusiast programmers
declare @userId int = ##UserId## DECLARE @tag0 nvarchar(25) = ##tag0:string## DECLARE @tag1 nvarchar(25) = ##tag1:string## SELECT p.Title, p.Tags, 'http://stackoverflow.com/questions/' + cast(p.Id as nvarchar(15)) as Link FROM Posts p INNER JOIN Votes v on v.PostId = P.Id INNER JOIN Users u on u.Id = v.UserId INNER JOIN PostTags pt on pt.PostId = p.Id INNER JOIN Tags t on t.Id = pt.TagId WHERE v.VoteTypeId = 5 and u.Id = @userId and t.TagName IN(@tag0,@tag1)