Posts eligible for keeper/archivist/curator


Please login or register to vote for this query.

(click on this box to dismiss)

Psychology & Neuroscience Meta

Q&A about the site for practitioners, researchers, and students in cognitive science, psychology, neuroscience, and psychiatry

DECLARE @UserId int = ##UserId##;

select, p.owneruserid
  from posts p
  join posts q
    on p.parentid =
   and p.owneruserid <> q.owneruserid
  join posthistory ph
    on p.parentid = ph.postid
   and p.owneruserid = ph.userid
   and p.creationdate between dateadd(hour, -12, ph.creationdate)
                          and dateadd(hour,  12, ph.creationdate)
  join votes v
    on = v.postid
 where p.posttypeid = 2
   and ph.posthistorytypeid in (4, 5)
   and q.posttypeid = 1
   and q.closeddate is null
   and v.votetypeid in (2, 3)
   and not exists ( select 1 
                      from votes 
                     where postid =
                       and v.votetypeid = 6
                       and v.creationdate <= dateadd(hour, 12, p.creationdate)
 group by, p.owneruserid
having sum(case when v.votetypeid = 2 then 1 else -1 end) >= 1

select *
  from all_posts
  where OwnerUserId = @UserId

Enter Parameters

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