Random Unanswered Posts

0

Please login or register to vote for this query.

(click on this box to dismiss)

Christianity

Q&A for committed Christians, experts in Christianity and those interested in learning more

SELECT TOP 15
  Score,
  Id AS [Post URL],
  ViewCount as Views,
  ClosedDate as 'Date Closed'
FROM
  Posts
WHERE
  -- PostTypeId of 1 is a question
  PostTypeId = 1 AND
  
  -- We want unanswered questions, right?
  AnswerCount = 0 AND
  
  -- Let's go for some tumbleweeds too (less likely to be closed)
  ViewCount < 500 AND
  
  -- make Id be more than a certain amount, 
  -- in this case a random point in the posts list
  -- Note that because we order by 'Id',
  -- the posts returned will all be sequential.
  Id > RAND() * 
      (SELECT TOP 1 
          Id 
        FROM Posts 
        ORDER BY Id DESC)
ORDER BY Id

Enter Parameters

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