Open question roomba

3

Please login or register to vote for this query.

(click on this box to dismiss)

The roomba for these questions runs on Saturdays. Depending on the post score and whether the poster's account has been deleted, these questions could be eligible for the roomba after either 30 or 365 days. See http://stackoverflow.com/help/roomba

Italian Language Meta

Q&A about the site for students, teachers, and linguists wanting to discuss the finer points of the Italian language

-- If the question is more than 365 days old, and ...
select Posts.CreationDate, Posts.OwnerUserId, Users.DisplayName, ViewCount, 
  Posts.Id as [Post Link], Tags
from Posts 
     ,Users
     --,PostHistory

where 
  -- joining tables
  Users.Id = Posts.OwnerUserId 
  -- and PostHistory.PostId = Posts.Id
  
  -- satisfying conditions
  and Posts.PostTypeId = 1 -- is a question
  and Posts.Score <= 0 -- has a score of 0
  and Posts.AnswerCount = 0 -- has no answers
  -- and PostHistory.PostHistoryTypeId <> 14  -- is not locked
  and Posts.CommentCount < 2  -- has 1 or 0 comments
  and Posts.ViewCount <= DATEDIFF(DAY, Posts.CreationDate, GETDATE()) * 1.5 -- has view count <= the age of the question in days times 1.5
  and DATEDIFF(DAY, Posts.CreationDate, GETDATE()) > (365 - ##WillBedeletedInXDays?10##) -- is old
  
  and not exists (
        select PostHistory.Id from PostHistory 
        where PostHistory.PostId = Posts.Id
        and PostHistory.PostHistoryTypeId = 14 -- post is locked
  )
order by Posts.CreationDate asc


/*
Documentation.

PostHistory.PostHistoryTypeId:
   10 Post Closed 
   11 Post Reopened
   12 Post Deleted
   13 Post Undeleted
   14 Post Locked
   15 Post Unlocked
   33 Post Notice Added
   34 Post Notice Removed
   
 */

Enter Parameters

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