Top Questions Without An Answer With A Tag

0

Please login or register to vote for this query.

(click on this box to dismiss)

Meta Stack Overflow

Q&A about the site for professional and enthusiast programmers

DECLARE @tag_id   INT = (SELECT ID FROM Tags WHERE TagName = 'bug');
DECLARE @question INT = (SELECT ID FROM PostTypes WHERE Name = 'Question'); --1

SELECT TOP 25
  q.Score, q.Id AS [Post Link], q.OwnerUserId As [User Link]
FROM Posts q
JOIN PostTags t ON q.ID = t.PostId AND t.TagID = @tag_id
WHERE q.AnswerCount = 0
  AND q.PostTypeID = @question
  AND q.ClosedDate IS NULL
ORDER BY q.Score DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results