select CustomerKey, concat(FirstName,' ',LastName) as Comprador, BikeBuyer from dbo.vTargetMail where BikeBuyer=1; create procedure sp_comprobici as select CustomerKey, concat(FirstName,' ', LastName) as Comprador, BikeBuyer from dbo.vTargetMail where BikeBuyer = 1; exec sp_comprobici ------------------------------- select * from bikebuyerprediction; alter proc ejercicio2 as select count(cliente) as NUMERO_DE_CLIENTES,compra_nocompra, PROBABILIDAD from bikebuyerprediction where compra_nocompra =1 and probabilidad >= 0.85 group by compra_nocompra , probabilidad exec ejercicio2