Created
November 30, 2019 02:14
-
-
Save tqaw19/7e0a88d4c844753ad8f4225492816293 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM dbo.BikeBuyerPrediction | |
WHERE COMPRA_NOCOMPRA = 1 and PROBABILIDAD >= 0.8; | |
SELECT * FROM dbo.BikeBuyer_Naive | |
create proc sp_bikebuyernaive as | |
SELECT * FROM dbo.BikeBuyer_Naive | |
WHERE COMPRA_NOCOMPRA = 1; | |
exec dbo.sp_comprobici | |
create proc sp_comprabici60 as | |
select CLIENTE, COMPRA_NOCOMPRA, PROBABILDIAD | |
from dbo.BikeBuyer_Naive | |
where Probabildiad >= 0.6; | |
exec sp_comprabici60 | |
exec ejercicio2 | |
---------------------------------------- | |
SELECT * FROM dbo.BikeBuyer_Naive | |
create proc sp_circular60 | |
as | |
select count(cliente) as NUMERO_DE_CLIENTES, as total,compra_nocompra, PROBABILDIAD from BikeBuyer_Naive | |
where compra_nocompra = 1 and PROBABILDIAD >= 0.60 | |
group by compra_nocompra , PROBABILDIAD | |
exec sp_circular60 | |
---------------------------------------- | |
alter proc sp_entradaprob @probabilidad nvarchar(3) | |
as | |
SELECT cliente, compra_nocompra,probabildiad, sum(compra_nocompra) as total | |
FROM dbo.BikeBuyer_Naive | |
WHERE compra_nocompra = 1 and probabildiad >= @probabilidad | |
GROUP BY compra_nocompra, cliente, probabildiad | |
select @@version | |
exec sp_entradaprob 0.7 | |
SELECT SUM(COMPRA_NOCOMPRA) AS TOTAL | |
FROM dbo.BikeBuyer_Naive | |
WHERE compra_nocompra = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment