Fastest Closed Posts

1

Please login or register to vote for this query.

(click on this box to dismiss)

Questions that were closd <1 minute

Ask Different

Q&A for power users of Apple hardware and software

select 
  q.id as [Post Link],
  q.creationdate as [Opened],
  count(h.id) as [# History Records],
  datediff(s,q.creationdate,q.closeddate) as [Secs until close],
  'site://posts/' + CAST(q.Id AS nvarchar) + '/timeline|' + 
  'View Timeline' AS [(Timeline)]

from 
  posts q left outer join posthistory h
  on q.id = h.postid
  
where 
  q.posttypeid = 1
  and q.closeddate is not null
  
group by
  q.id,
  q.creationdate,
  q.closeddate

having
   datediff(s,q.creationdate,q.closeddate) < 60
   and min(h.userid) <> max(h.userid)

order by 
   datediff(s,q.creationdate,q.closeddate)

Enter Parameters

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