$query = "SELECT BillingCode, COUNT(IdTransaccion) FROM datosisub WHERE EstadoCompra LIKE 'S%' AND Fecha BETWEEN '$Desde' AND '$Hasta' GROUP BY BillingCode";