SELECT p.Id AS [Post Link], p.CreationDate FROM Posts AS ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Sustainable Living

Q&A for folks dedicated to a lifestyle that can be maintained indefinitely without depleting available resources

SELECT p.Id AS [Post Link], p.CreationDate
  FROM Posts AS p 
 INNER JOIN PostTags AS pt ON pt.PostId = p.Id 
  INNER JOIN Tags AS tn ON pt.TagId = tn.Id AND tn.TagName = '##tagname##'
  LEFT OUTER JOIN PostLinks AS pl ON pl.PostId = p.Id AND pl.LinkTypeId = 3 --duplicate
  WHERE p.PostTypeId = 1 
    AND p.ClosedDate < DATEADD(dd, -10, GETDATE()) 
    AND p.AcceptedAnswerId is null
    AND p.Score < 2
    AND (p.AnswerCount = 0 
           OR (SELECT max(a.Score) FROM Posts AS a WHERE a.ParentId = p.Id) < 2)
    AND pl.Id is null
  ORDER BY p.CreationDate DESC

Enter Parameters

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