SELECT SUM(a.fob+a.costo_flete),count(*) FROM cgtb00018 a,cgtb00017 b WHERE a.num_oc = 100 and a.tipo = "02" and b.fecha between "010699" and "300699" and a.num_oc = b.num_oc and a.tipo = b.tipo and a.status_t is null and a.rep_entrada = b.rep_entrada