Q's with unaccepted A's in my tags 3-4 months ago

0

Please login or register to vote for this query.

(click on this box to dismiss)

The Workplace Meta

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
);

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results