Data

mail@pastecode.io avatar
unknown
plain_text
a year ago
19 kB
12
Indexable
Never
USE FLower
Go

select * from SalesPerson
insert into SalesPerson(PersonnelID,[FirstName],[LastName],WorkingHour,[Role],Salary,Birthdate,Gender,HiringDate,PhoneNumber)
values ('961111111','Nguyen Hoang','Nam','8-13','florist','5400000','1988-12-21','Male','2020-07-12','0931174477')
insert into SalesPerson(PersonnelID,[FirstName],[LastName],WorkingHour,[Role],Salary,Birthdate,Gender,HiringDate,PhoneNumber)
values ('961111112','Nguyen Trong','Hieu','8-13','florist','5400000','1993-09-11','Male','2020-10-01','0931165444')
insert into SalesPerson(PersonnelID,[FirstName],[LastName],WorkingHour,[Role],Salary,Birthdate,Gender,HiringDate,PhoneNumber)
values ('961111113','Truong My','Linh','8-13','cashier','5000000','1996-02-11','Female','2020-02-01','0932681144')
insert into SalesPerson(PersonnelID,[FirstName],[LastName],WorkingHour,[Role],Salary,Birthdate,Gender,HiringDate,PhoneNumber)
values ('961111114','Nguyen Nhat','Sang','8-20','ShopPerson','10960000','1992-07-13','Male','2020-01-20','0937069595')
insert into SalesPerson(PersonnelID,[FirstName],[LastName],WorkingHour,[Role],Salary,Birthdate,Gender,HiringDate,PhoneNumber)
values ('9611111115','Nguyen Tan','Tai','15-19','florist','5400000','1996-01-21','Male','2020-07-01','0934064949')
insert into SalesPerson(PersonnelID,[FirstName],[LastName],WorkingHour,[Role],Salary,Birthdate,Gender,HiringDate,PhoneNumber)
values ('961111116','Thu','Ngan','19-23','florist','5400000','1998-12-11','Male','2020-01-01','0931163444')


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('Orange','#FFA500')
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 FlowerType
delete from FlowerType 
insert into FlowerType(Title,MoreInfo) values('Cut Flowers','Shakhe boride/')
insert into FlowerType(Title,MoreInfo) values('Flowers','golhaye zinati baghche/')
insert into FlowerType(Title,MoreInfo) values('Potted plant','Goldani bedoone Gol/')
insert into FlowerType(Title)           values('Cactus/Succulent')
insert into FlowerType(Title,MoreInfo) values('Terrarium','Bagh shishei/')
insert into FlowerType(Title,MoreInfo) values('Potted plant Flower','Goldani ba Gol/')

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
delete 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])
values ('Sadec flower village','Raha Ahmadi','Narges Taghados','Dong Thap')
insert into GreenHouse([Name],[Manager],[Owner],[Address])
values ('Dalat market','Ghazale Zehtab','Ghazale Zehtab','Esfahan,Dalat')
insert into GreenHouse([Name],[Manager],[Owner],[Address])
values ('Vinh Long market','Farimah Ataie','Nasim Zareie','Esfahan,Vinh Long')

select * from GreenHousePhones
insert into GreenHousePhones([GreenHouseID],ManagerPhone,phone1,phone2,phone3)
values(1,09134466887,03145564882,03177885594,03144687639)
insert into GreenHousePhones([GreenHouseID],ManagerPhone,phone1,phone2,phone3)
values(2,09357786773,03179904771,0313378897,03166512789)
insert into GreenHousePhones([GreenHouseID],ManagerPhone,phone1,phone2)
values(3,09130987698,03166445599,03166776654)

select * from SalesPerson where [role]='purchaser'
select * from GreenHouse
select * from Buy

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


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

select * from Flower
select * from Buy
select * from FlowerType
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',190000,'111','3',180,3)

insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Aralia',210000,'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',600000,'106','14',20,6)

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

insert into Flower(Flowername,Price,FlowercolorID,LastingTime,Number,[TypeID])
values ('Orkide',300000,'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 Customer
select * from Flower
select * from Packaging
select * from [Order]
select * from Occasion
select * from FlowersInOrder
insert into [Order] (CustomerID,Ordertype,Shopdate,PackageID,TotalCost,Discount,FinalCost,OccasionID,Wrappingprice)
Values (100,'Online','1398-12-02',2,0,0,0,6,40000)
insert into FlowersInOrder(OrderID,FlowerID,Number) values(1,2,20)

insert into [Order] (CustomerID,Ordertype,Shopdate,PackageID,TotalCost,Discount,FinalCost,OccasionID,Wrappingprice)
Values (101,'Online','1398-12-03',2,350000,0,350000,1,130000)
insert into FlowersInOrder(OrderID,FlowerID,Number) values(1,3,40)

insert into [Order] (CustomerID,Ordertype,Shopdate,PackageID,TotalCost,Discount,FinalCost,OccasionID,Wrappingprice)
Values (102,'Not_Online','1398-12-03',6,50000,0,50000,1,20000)
insert into FlowersInOrder(OrderID,FlowerID,Number) values(4,4,4)
insert into FlowersInOrder(OrderID,FlowerID,Number) values(4,3,4)

insert into [Order] (CustomerID,OrderType,ShopDate,PackageID,TotalCost,Discount,FinalCost,OccasionID,WrappingPrice,MoreInfo)
Values (103,'Not_Online','1398-12-03',6,1500000,0,1500000,6,25000,'All Reses are used')
insert into FlowersInOrder(OrderID,FlowerID,Number) values(5,4,150)

insert into [Order] (CustomerID,Ordertype,Shopdate,PackageID,TotalCost,Discount,FinalCost,OccasionID,Wrappingprice)
Values (104,'Not_Online','1398-12-04',6,150000,0,150000,2,35000)
insert into FlowersInOrder(OrderID,FlowerID,Number) values(6,4,9)

insert into [Order] (CustomerID,Ordertype,Shopdate,PackageID,TotalCost,Discount,FinalCost,OccasionID,Wrappingprice)
Values (105,'Not_Online','1398-12-04',6,430000,0,430000,1,40000)
insert into FlowersInOrder(OrderID,FlowerID,Number) values(7,3,12)

insert into [Order] (CustomerID,Ordertype,Shopdate,PackageID,TotalCost,Discount,FinalCost,OccasionID,Wrappingprice)
Values (100,'Not_Online','1398-12-04',6,30000,0,30000,6,15000)
insert into FlowersInOrder(OrderID,FlowerID,Number) values(8,2,2)

insert into [Order] (CustomerID,OrderType,ShopDate,PackageID,TotalCost,Discount,FinalCost,OccasionID,WrappingPrice,MoreInfo)
Values (103,'Not_Online','1398-12-05',NULL,50000,0,50000,6,10000,NULL)
insert into FlowersInOrder(OrderID,FlowerID,Number) values(9,19,1)

insert into [Order] (CustomerID,Ordertype,Shopdate,PackageID,TotalCost,Discount,FinalCost,OccasionID,Wrappingprice)
Values (104,'Not_Online','1398-12-05',NULL,250000,30000,220000,1,40000)
insert into FlowersInOrder(OrderID,FlowerID,Number) values(10,15,4)

insert into [Order] (CustomerID,Ordertype,Shopdate,PackageID,TotalCost,Discount,FinalCost,OccasionID,Wrappingprice)
Values (105,'Not_Online','1398-12-05',NULL,100000,0,100000,1,780000)
insert into FlowersInOrder(OrderID,FlowerID,Number) values(11,4,2)


select * from BoughtFlower;
select * from Buy
select * from Flower
insert into BoughtFlower values(1,2,300,150000)
insert into BoughtFlower values(1,3,900,450000)
insert into BoughtFlower values(1,4,300,150000)
insert into BoughtFlower values(1,5,300,150000)

insert into BoughtFlower values(4,2,600,300000)
insert into BoughtFlower values(4,3,900,450000)
insert into BoughtFlower values(4,4,300,150000)
insert into BoughtFlower values(4,5,300,150000)


insert into BoughtFlower values(7,2,600,300000)
insert into BoughtFlower values(7,3,900,450000)
insert into BoughtFlower values(7,4,300,150000)
insert into BoughtFlower values(7,5,300,150000)

insert into BoughtFlower values(10,2,600,300000)
insert into BoughtFlower values(10,3,900,450000)
insert into BoughtFlower values(10,4,300,150000)
insert into BoughtFlower values(10,5,300,150000)

insert into BoughtFlower values(13,2,600,300000)
insert into BoughtFlower values(13,3,900,450000)
insert into BoughtFlower values(13,4,300,150000)
insert into BoughtFlower values(13,5,300,150000)

insert into BoughtFlower values(16,2,600,300000)
insert into BoughtFlower values(16,3,900,450000)
insert into BoughtFlower values(16,4,300,150000)
insert into BoughtFlower values(16,5,300,150000)

insert into BoughtFlower values(19,2,600,300000)
insert into BoughtFlower values(19,3,900,450000)
insert into BoughtFlower values(19,4,300,150000)
insert into BoughtFlower values(19,5,300,150000)

insert into BoughtFlower values(21,2,600,300000)
insert into BoughtFlower values(21,3,900,450000)
insert into BoughtFlower values(21,4,300,150000)
insert into BoughtFlower values(21,5,300,150000)

insert into BoughtFlower values(24,2,600,300000)
insert into BoughtFlower values(24,3,900,450000)
insert into BoughtFlower values(24,4,300,150000)
insert into BoughtFlower values(24,5,300,150000)

insert into BoughtFlower values(27,2,600,300000)
insert into BoughtFlower values(27,3,900,450000)
insert into BoughtFlower values(27,4,300,150000)
insert into BoughtFlower values(27,5,300,150000)


insert into BoughtFlower values(30,2,600,300000)
insert into BoughtFlower values(30,3,900,450000)
insert into BoughtFlower values(30,4,300,150000)
insert into BoughtFlower values(30,5,300,150000)


insert into BoughtFlower values(2,6,100,1000000)
insert into BoughtFlower values(2,7,200,1000000)
insert into BoughtFlower values(2,8,300,1000000)
insert into BoughtFlower values(2,9,300,1000000)


insert into BoughtFlower values(5,6,100,1000000)
insert into BoughtFlower values(5,7,200,1000000)
insert into BoughtFlower values(5,8,300,1000000)
insert into BoughtFlower values(5,9,300,1000000)

insert into BoughtFlower values(8,6,100,1000000)
insert into BoughtFlower values(8,7,200,1000000)
insert into BoughtFlower values(11,8,300,1000000)
insert into BoughtFlower values(11,9,300,1000000)

insert into BoughtFlower values(3,10,100,1000000)
insert into BoughtFlower values(3,11,200,1000000)
insert into BoughtFlower values(6,12,300,900000)
insert into BoughtFlower values(6,13,300,2000000)

insert into BoughtFlower values(9,10,100,1000000)
insert into BoughtFlower values(9,11,200,1000000)
insert into BoughtFlower values(12,12,300,900000)
insert into BoughtFlower values(12,13,300,2000000)

insert into BoughtFlower values(9,14,500,1000000)
insert into BoughtFlower values(9,15,200,1000000)
insert into BoughtFlower values(12,16,340,780000)
insert into BoughtFlower values(12,17,340,2000000)


insert into BoughtFlower values(15,14,500,1000000)
insert into BoughtFlower values(15,15,200,1000000)
insert into BoughtFlower values(18,16,340,780000)
insert into BoughtFlower values(18,17,340,2000000)


insert into BoughtFlower values(22,14,500,1000000)
insert into BoughtFlower values(22,15,200,1000000)
insert into BoughtFlower values(25,18,340,780000)
insert into BoughtFlower values(25,19,340,2000000)