SELECT MAX(DATEDIFF(dt1.fecha, dt2.fecha)) maximo FROM datos dt1 INNER JOIN datos dt2 ON dt1.salida_num = dt2.salida_num + 1