dư xlieuej

mail@pastecode.io avatar
unknown
plain_text
a year ago
16 kB
1
Indexable
Never
USE ShopFlower
Go

select * from SalesPerson
insert into SalesPerson(PersonID,[first_name],[last_name],Salary,Birthdate,Gender,Hiring_date,Mobile_number)
values (1,'Nguyen Hoang','Nam',5400000,'1988-12-21','Male','2020-07-12','0931174477')
insert into SalesPerson(PersonID,[first_name],[last_name],Salary,Birthdate,Gender,Hiring_date,Mobile_number)
values (2,'Nguyen Trong','Hieu',5300000,'1993-09-11','Male','2020-10-01','0931165444')
insert into SalesPerson(PersonID,[first_name],[last_name],Salary,Birthdate,Gender,Hiring_date,Mobile_number)
values (3,'Truong My','Linh',5000000,'1996-02-11','Female','2020-02-01','0932681144')


select * from Colour

insert into Colour(ColorName,HexCode) values('Red','#FF0000')
insert into Colour(ColorName,HexCode) values('Maroon','#800000')
insert into Colour(ColorName,HexCode) values('DarkRed','#8B0000')
insert into Colour(ColorName,HexCode) values('Pink','#FFC0CB')
insert into Colour(ColorName,HexCode) values('MediumVioletRed','#C71585')
insert into Colour(ColorName,HexCode) values('PaleVioletRed','#DB7093')
insert into Colour(ColorName,HexCode) values('LightSalmon','#FFA07A')
insert into Colour(ColorName,HexCode) values('Orange','#FFA500')
insert into Colour(ColorName,HexCode) values('Yellow','#FFFF00')
insert into Colour(ColorName,HexCode) values('LemonChiffon','#FFFACD')
insert into Colour(ColorName,HexCode) values('Lavender','#E6E6FA')
insert into Colour(ColorName,HexCode) values('Purple','#800080')
insert into Colour(ColorName,HexCode) values('RebeccaPurple','#663399')
insert into Colour(ColorName,HexCode) values('LimeGreen','#32CD32')
insert into Colour(ColorName,HexCode) values('SeaGreen','#2E8B57')
insert into Colour(ColorName,HexCode) values('Olive','#808000')
insert into Colour(ColorName,HexCode) values('Teal','#008080')
insert into Colour(ColorName,HexCode) values('SkyBlue','#87CEEB')
insert into Colour(ColorName,HexCode) values('Navy','#000080')
insert into Colour(ColorName,HexCode) values('BlanchedAlmond','#FFEBCD')
insert into Colour(ColorName,HexCode) values('Sienna','#A0522D')
insert into Colour(ColorName,HexCode) values('White','#FFFFFF')
insert into Colour(ColorName,HexCode) values('Snow','#FFFAFA')
insert into Colour(ColorName,HexCode) values('Gold','#FFD700')

select * from Occasion

insert into Occasion(Title) values ('Birthday')
insert into Occasion(Title) values ('Anniversary')
insert into Occasion(Title) values ('Valentine')
insert into Occasion(Title) values ('Funeral')
insert into Occasion(Title) values ('Appreciation')
insert into Occasion(Title) values ('Other')

select * from Customer

insert into Customer([FirstName],[LastName],Addess,Phone,BirthDate,Gender) 
values('Nguyen Nhu','Ngoc','01 Hoa Binh, Ninh Kieu, Can Tho','0979247331','1989-09-30','Female')
insert into Customer([FirstName],[LastName],Addess,Phone,BirthDate,Gender) 
values('Nguyen Thanh','Truc','Khu Bai boi Song Hong, Ninh Kieu, Can Tho','0786779955','1087-11-03','Female') 
insert into Customer([FirstName],[LastName],Addess,Phone,BirthDate,Gender) 
values('Tran Van','Quy','duong Hai Ba Trung, Ninh Kieu, Can Tho','079269996','1999-12-03','Male') 
insert into Customer([FirstName],[LastName],Addess,Phone,BirthDate,Gender) 
values('Hoang Xuan','Vinh','389R duong Nguyen Van CU Noi Dai','0798185555','1989-01-13','Male') 
insert into Customer([FirstName],[LastName],Addess,Phone,BirthDate,Gender) 
values('Nguyen Bao','Tran','Tran Nam Phu, Ninh Kieu, Can Tho','0973869657','1998-11-03','Female') 
insert into Customer([FirstName],[LastName],Addess,Phone,BirthDate,Gender) 
values('Nguyen Huyen','Tran','phuong An Binh, Cai Rang, Can Tho','0903845764','1997-08-03','Female') 
insert into Customer([FirstName],[LastName],Addess,Phone,BirthDate,Gender) 
values('Tran Van','Khoa','Long Tuyen, Binh Thuy, Can Tho','094623857','1980-09-30','Male')
insert into Customer([FirstName],[LastName],Addess,Phone,BirthDate,Gender) 
values('Hoang Vu','Thai','Le Hong Phong, Binh Thuy, Can Tho','0963857623','1998-11-03','Male') 


select * from GreenHouse

insert into GreenHouse([Name],[Manager],[Owner],[Address], ManagerPhone)
values ('Sadec flower village','Raha Ahmadi','Narges Taghados','Dong Thap',0317788559)
insert into GreenHouse([Name],[Manager],[Owner],[Address], ManagerPhone)
values ('Dalat market','Ghazale Zehtab','Ghazale Zehtab','Esfahan,Dalat',0313378897)
insert into GreenHouse([Name],[Manager],[Owner],[Address], ManagerPhone)
values ('Vinh Long market','Farimah Ataie','Nasim Zareie','Esfahan,Vinh Long',0316677665)

select * from SalesPerson
select * from GreenHouse
select * from Buy

insert into Buy(GreenHouseID,SalesPersonID,TotalPeyment,BuyDate) 
values(1,93789932,1900000,'1398-12-02')
insert into Buy(GreenHouseID,SalesPersonID,TotalPeyment,BuyDate) 
values(2,94739555,2900000,'1398-12-02')
insert into Buy(GreenHouseID,SalesPersonID,TotalPeyment,BuyDate) 
values(3,96789922,1100000,'1398-12-02')
insert into Buy(GreenHouseID,SalesPersonID,TotalPeyment,BuyDate) 
values(1,93789932,900000,'1398-12-03')
insert into Buy(GreenHouseID,SalesPersonID,TotalPeyment,BuyDate) 
values(2,94739555,500000,'1398-12-03')
insert into Buy(GreenHouseID,SalesPersonID,TotalPeyment,BuyDate) 
values(3,96789922,1000000,'1398-12-03')
insert into Buy(GreenHouseID,SalesPersonID,TotalPeyment,BuyDate)  
values(1,93789932,1900000,'1398-12-04')
insert into Buy(GreenHouseID,SalesPersonID,TotalPeyment,BuyDate) 
values(2,94739555,2900000,'1398-12-04')
insert into Buy(GreenHouseID,SalesPersonID,TotalPeyment,BuyDate)  
values(3,96789922,1100000,'1398-12-04')
insert into Buy(GreenHouseID,SalesPersonID,TotalPeyment,BuyDate) 
values(1,93789932,900000,'1398-12-05')
insert into Buy(GreenHouseID,SalesPersonID,TotalPeyment,BuyDate)  
values(2,94739555,500000,'1398-12-05')
insert into Buy(GreenHouseID,SalesPersonID,TotalPeyment,BuyDate) 
values(3,96789922,1000000,'1398-12-05')
insert into Buy(GreenHouseID,SalesPersonID,TotalPeyment,BuyDate)  
values(1,93789932,900000,'1398-12-06')
insert into Buy(GreenHouseID,SalesPersonID,TotalPeyment,BuyDate)  
values(2,94739555,500000,'1398-12-06')
insert into Buy(GreenHouseID,SalesPersonID,TotalPeyment,BuyDate)  
values(3,96789922,600000,'1398-12-06')
insert into Buy(GreenHouseID,SalesPersonID,TotalPeyment,BuyDate)  
values(1,93789932,900000,'1398-12-07')
insert into Buy(GreenHouseID,SalesPersonID,TotalPeyment,BuyDate)  
values(2,94739555,500000,'1398-12-07')


select * from Packaging
select * from Occasion
delete from Packaging
insert into Packaging(PackagType,Design,[Card])
values ('Basket','designer','Yes')
insert into Packaging(PackagType,PaperColorID,StringColorID,Design,[Card])
values ('Basket',119,102,'designer','No')
insert into Packaging(PackagType,Design,[Card])
values ('Basket','designer','No')
insert into Packaging(PackagType,Design,[Card])
values ('Bouquet/Dastegol','design shop','Yes')
insert into Packaging(PackagType,Design,[Card])
values ('Bouquet/Dastegol','design shop','No')
insert into Packaging(PackagType,PaperColorID,StringColorID,Design,PackageDescription,[Card])
values ('Bouquet/Dastegol',107,106,'design shop','I Love You','Yes')
insert into Packaging(PackagType,PaperColorID,StringColorID,Design,[Card])
values ('Bouquet/Dastegol',109,114,'design shop','Yes')
insert into Packaging(PackagType,Design,[Card])
values ('Single Flower','design shop','No')
insert into Packaging(PackagType,Design,PackageDescription,[Card])
values ('Single Flower','design shop','Use Red','No')

select * from Flower
select * from Buy
select * from Colour
insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Rose',8000,102,3,220,2)
insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Rose',8000,100,3,200,2)

insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Rose',8000,103,3,200,2)

insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Rose',8000,122,3,100,2)

insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Aralia',19000,111,3,180,3)

insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Aralia',21000,122,3,180,3)

insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Aspidistra elatior',80000,111,3,100,3)

insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Gazmania',40000,107,14,20,6)

insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Virziya',60000,124,14,20,6)

insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Virzayi',60000,106,14,20,6)

insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Orkide',30000,108,14,10,6)

insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Orkide',30000,122,14,10,6)
insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Anar',50000,100,14,10,6)
insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Sonbol',22000,108,14,10,6)
insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Havertia',25000,111,7,20,4)
insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Cerasula',60000,111,7,100,4)
insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('kirsto',90000,111,7,20,4)
insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Mirtilo',80000,110,7,10,4)

select * from Flower
insert into Product(ID,Flowername,Price,Linkimage,Quantity,[Description])
values (1,'Hoa Hồng Trắng Sinh Nhật', 1000000, 'https://i.pinimg.com/236x/94/78/4a/94784acb3df49842a7fb9c1e916a7905.jpg', 20, 'Hoa hồng trắng được dành cho các dịp đặt biệt như sinh nhật, Valentine ' )
insert into Product(ID,Flowername,Price,Linkimage,Quantity,[Description])
values (2,'Hoa Giỏ Hồng Trắng', 800000, 'https://i.pinimg.com/236x/e8/cd/03/e8cd035b991be253f315ef5880725400.jpg', 12, 'Thích hợp cho các văn phòng và các shop trưng bày' )
insert into Product(ID,Flowername,Price,Linkimage,Quantity,[Description])
values (3,'Hoa Giỏ Hồng Đỏ', 700000, 'https://i.pinimg.com/236x/90/c1/24/90c1241b968172304bcbb67e329e928c.jpg', 20, 'Thích hợp cho các văn phòng và các shop trưng bày' )
insert into Product(ID,Flowername,Price,Linkimage,Quantity,[Description])
values (4,'Hoa Giỏ Đỏ Trắng', 700000, 'https://i.pinimg.com/236x/90/3b/b2/903bb2fda61345b43a02117c62718bc4.jpg', 20, 'Thích hợp cho các văn phòng và các shop trưng bày' )
insert into Product(ID,Flowername,Price,Linkimage,Quantity,[Description])
values (5,'Hoa Sáp Hướng Dương', 700000, 'https://i.pinimg.com/564x/ac/92/46/ac9246e8514e81e69c35a3f318ea18ae.jpg', 20, 'Thích hợp cho các văn phòng và các shop trưng bày' )
insert into Product(ID,Flowername,Price,Linkimage,Quantity,[Description])
values (6,'Hoa Bó Hồng Trắng', 70000, 'https://i.pinimg.com/236x/50/35/db/5035dba69717060804c674990887831b.jpg', 20, 'Hoa phù hợp cho các dịp như sinh nhật, lễ trưởng thành' )
insert into Product(ID,Flowername,Price,Linkimage,Quantity,[Description])
values (7,'Hoa Giỏ Hướng Dương', 200000, 'https://i.pinimg.com/236x/98/ae/c0/98aec09e04e3ae86b36e7d4f96e3b05c.jpg', 20, 'Thích hợp cho các văn phòng và các shop trưng bày' )
insert into Product(ID,Flowername,Price,Linkimage,Quantity,[Description])
values (8,'Hoa Hồng Vàng', 300000, 'https://i.pinimg.com/236x/e2/b3/22/e2b322e555f4477cfe69cd186bc3297b.jpg', 12, 'Thích hợp cho các văn phòng và các shop trưng bày' )
insert into Product(ID,Flowername,Price,Linkimage,Quantity,[Description])
values (9,'Hoa Cẩm Tú Cầu', 150000, 'https://i.pinimg.com/236x/91/09/d1/9109d13348d2b879f5ff7a1e3ef40341.jpg', 20, 'Thích hợp cho các văn phòng và các shop trưng bày' )
insert into Product(ID,Flowername,Price,Linkimage,Quantity,[Description])
values (10,'Hoa Hồng Trắng', 150000, 'https://i.pinimg.com/236x/72/7a/f0/727af0214c11454b4795c66a6cca596a.jpg', 20, 'Hoa hồng trắng được dành cho các dịp đặt biệt như sinh nhật, Valentine' )
insert into Product(ID,Flowername,Price,Linkimage,Quantity,[Description])
values (11,'Hoa Tulip', 100000, 'https://i.pinimg.com/236x/d0/35/6b/d0356bf6a816bc15ac598b13a59a49e0.jpg', 20, 'Thích hợp cho các văn phòng và các shop trưng bày' )
insert into Product(ID,Flowername,Price,Linkimage,Quantity,[Description])
values (12,'Hoa Hồng Trắng Valentine', 70000, 'https://i.pinimg.com/564x/bd/a0/3f/bda03f3e6f7f8de3b4fb97312340bb4c.jpg', 20, 'Hoa phù hợp cho các dịp như sinh nhật, Valentine' )















select * from Customer
select * from Flower
select * from Packaging
select * from [Order]
select * from Occasion
insert into [Order] (CustomerID,Shopdate,PackageID,Total,Discount,OccasionID,Wrappingprice)
Values (100,'2022-06-03',2,200000,0,6,40000)

insert into [Order] (CustomerID,Shopdate,PackageID,Total,Discount,OccasionID,Wrappingprice)
Values (101,'2022-06-03',2,350000,0,1,130000)

insert into [Order] (CustomerID,Shopdate,PackageID,Total,Discount,OccasionID,Wrappingprice)
Values (103,'2022-06-03',6,1500000,0,6,25000)

insert into [Order] (CustomerID,Shopdate,PackageID,Total,Discount,OccasionID,Wrappingprice)
Values (104,'2022-06-03',6,150000,0,2,35000)

insert into [Order] (CustomerID,Shopdate,PackageID,Total,Discount,OccasionID,Wrappingprice)
Values (105,'2022-06-03',6,430000,0,1,40000)

insert into [Order] (CustomerID,Shopdate,PackageID,Total,Discount,OccasionID,Wrappingprice)
Values (100,'2022-06-04',6,30000,0,6,15000)

insert into [Order] (CustomerID,Shopdate,PackageID,Total,Discount,OccasionID,Wrappingprice)
Values (103,'2022-06-05',NULL,50000,0,6,10000)

insert into [Order] (CustomerID,Shopdate,PackageID,Total,Discount,OccasionID,Wrappingprice)
Values (104,'2022-06-05',NULL,250000,30000,1,40000)

insert into [Order] (CustomerID,Shopdate,PackageID,Total,Discount,OccasionID,Wrappingprice)
Values (105,'2022-06-05',NULL,100000,0,1,780000)


select * from Customer
select * from Flower
select * from [Order]
select * from SalesPerson
insert into [OrderDetail](CustomerID,SalesPersonID,Shopdate,FlowerName,Price,GreenHouseID,Number,Total)
Values(100,1,'2022-06-03','Gazmania',2600000,1,1,2600000)
insert into [OrderDetail](CustomerID,SalesPersonID,Shopdate,FlowerName,Price,GreenHouseID,Number,Total)
Values(101,1,'2022-06-03','Orkide',3800000,2,3,11400000)
insert into [OrderDetail](CustomerID,SalesPersonID,Shopdate,FlowerName,Price,GreenHouseID,Number,Total)
Values(103,1,'2022-06-03','Havertia',1525000,1,1,1525000)
insert into [OrderDetail](CustomerID,SalesPersonID,Shopdate,FlowerName,Price,GreenHouseID,Number,Total)
Values(104,1,'2022-06-03','Sonbol',185000,3,2,370000)
insert into [OrderDetail](CustomerID,SalesPersonID,Shopdate,FlowerName,Price,GreenHouseID,Number,Total)
Values(100,2,'2022-06-04','Gazmania',450000,1,2,900000)
insert into [OrderDetail](CustomerID,SalesPersonID,Shopdate,FlowerName,Price,GreenHouseID,Number,Total)
Values(104,3,'2022-06-05','Mirtilo',2600000,1,1,2600000  )
insert into [OrderDetail](CustomerID,SalesPersonID,Shopdate,FlowerName,Price,GreenHouseID,Number,Total)
Values(105,3,'2022-06-05','Gazmania',2600000,1,1,2600000  )