Questions with no answers and a positive score

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

declare @dateFilter date
set @dateFilter = DATEADD(DAY, -##IgnoreDays?7##, GETDATE())

SELECT
  p.Id as [Post Link],
  p.Score,
  p.CommentCount,
  p.LastActivityDate
  --p.AcceptedAnswerId
  --pt.Name
FROM 
  Posts p
  JOIN PostTypes pt ON pt.Id = p.PostTypeId
WHERE 
  p.Score >= 0
  AND p.ClosedDate IS NULL
  AND (p.AnswerCount IS NULL OR p.AnswerCount = 0)
  AND p.AcceptedAnswerId IS NULL
  AND p.CreationDate <= @dateFilter
  AND pt.Name = 'Question'
  AND p.CommunityOwnedDate IS NULL
ORDER BY 
  p.LastActivityDate ASC

Enter Parameters

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