Skip to content

Instantly share code, notes, and snippets.

View tqaw19's full-sized avatar
💭
Welcome!

Alejandro Quesada tqaw19

💭
Welcome!
View GitHub Profile
{
"workbench.colorTheme": "Community Material Theme Darker High Contrast",
"workbench.editor.enablePreview": false,
"editor.formatOnSave": true,
// "editor.fontFamily": "DaddyTimeMono Nerd Font",
"editor.fontFamily": "JetBrainsMono NF",
// "editor.fontFamily": "ShureTechMono NF",
"editor.fontSize": 14,
// "editor.fontWeight": 400,
"editor.fontLigatures": true,
-- ================================================
-- Template generated from Template Explorer using:
-- Create Procedure (New Menu).SQL
--
-- Use the Specify Values for Template Parameters
-- command (Ctrl-Shift-M) to fill in the parameter
-- values below.
--
-- This block of comments will not be included in
-- the definition of the procedure.
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 table [dbo].[Factura](
[num_factura] [int] PRIMARY KEY IDENTITY(1,1) NOT NULL,
[fecha] [Date] null,
[monto] [money] null,
[id_cliente] [int] REFERENCES [dbo].[Cliente] (id_cliente))
alter table [dbo].[Factura]
add constraint (id_producto)
add foreign key (id_producto) references [dbo].[Producto] (id_producto)
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
-------------------------------
use NORTHWIND
-------------------------------
select * from Categories;
create procedure ejemplo1 @categ nvarchar(15) as
select productid, productname,
unitprice, categoryname from Products
inner join Categories on
Categories.CategoryID = .products.CategoryID
where Categoryname=@categ
----------------------------------