Q&A for legal professionals, students, and others with experience or interest in law
-- Copy & paste your "favorite tags" from a StackExchange site.
-- Note: As data.stackexchange.com is updated only once a week,
-- you'll see bounties which are put shortly after the update
-- very late.
DECLARE @text VARCHAR(256) = ##WhitespaceSeparatedTags:String##;
p.Id as [Post Link],
FROM Posts p
LEFT JOIN PostTags pt ON p.Id = pt.PostId
LEFT JOIN Tags t ON pt.TagId = t.Id
-- is question
p.PostTypeId = 1
-- question contains one of the given tags
AND CONCAT(' ', @text, ' ') LIKE CONCAT('% ', t.TagName COLLATE DATABASE_DEFAULT, ' %')
GROUP BY p.Id, p.CreationDate, p.Tags, p.Score, p.ViewCount
ORDER BY p.Score DESC, p.ViewCount DESC