Q&A about the site for members of the workforce navigating the professional setting
DECLARE @tags table(TagId int); INSERT @tags SELECT Id FROM Tags WHERE TagName IN (N'sql-server', N't-sql'); DECLARE @start date = DATEADD(MONTH, -4, getdate()); SELECT p.Id, p.Title, link = CONCAT('https://stackoverflow.com/q/', p.Id) FROM Posts AS p WHERE AcceptedAnswerId IS NULL AND CreationDate >= @start AND CreationDate < DATEADD(MONTH, 1, @start) AND EXISTS ( SELECT 1 FROM @tags AS t INNER JOIN PostTags AS pt ON t.TagId = pt.TagId AND pt.PostId = p.Id );