Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table Products (
- product_id int,
- product_name varchar(255),
- supplier_id int,
- product_type varchar(255),
- product_price money,
- );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5441, ' Apple iPhone XR' , 305, 'Apple mobile phones ', 899);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5442, 'Apple iPhone XS' , 306, 'Apple mobile phones ', 1349);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5443, ' Apple iPhone 8' , 306, 'Apple mobile phones ', 849 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5445, 'Apple iPhone X' , 306, 'Apple mobile phones ', 1149);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5446, 'Samsung Galaxy A9' , 306, 'Samsung mobile phones ', 549);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price)
- VALUES (5447, 'Samsung Galaxy J4+' , 306, 'Samsung mobile phones', 244 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5448, 'Samsung Galaxy A6s' , 306, 'Samsung mobile phones', 422 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5449, 'Samsung A9 Star' , 306, 'Samsung mobile phones', 710);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5450, 'Lenovo Z5 Pro' , 306, 'Lenovo mobile phones', 488 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price)
- VALUES (5451, 'Lenovo K5 Pro' , 306, 'Lenovo mobile phones', 244);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price)
- VALUES (5452, 'Lenovo K5s' , 306, 'Lenovo mobile phones', 199);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price)
- VALUES (5453, 'Lenovo S5 Pro ' , 306, 'Lenovo mobile phones', 311);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price)
- VALUES (5454, 'Nokia X7' , 306, 'Nokia mobile phones', 444);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5455, 'Nokia 3.1 Plus' , 306, 'Nokia mobile phones', 255 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5456, 'Nokia 7.1' , 306, 'Nokia mobile phones', 555);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5457, 'Nokia X5' , 306, 'Nokia mobile phones', 222);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5458, 'Sony Xperia XZ3' , 306, 'Sony mobile phones', 1422);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5459, 'Sony Xperia XA2 Plus' , 306, 'Sony mobile phones ', 733);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5460, 'Sony Xperia XZ2 Premium' , 306, 'Sony mobile phones ', 1444 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5461, 'Blackberry KEY2 LE' , 306, 'Blackberry mobile phones', 666 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5462, 'Blackberry EvolveX' , 306, 'Blackberry mobile phones', 777 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5463, 'Blackberry Aurora' , 306, 'Blackberry mobile phones', 388 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5463, 'Blackberry Motion' , 306, 'Blackberry mobile phones', 666);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5464, 'Asus Zenfone Max' , 306, 'Asus mobile phones', 166);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5465, 'Asus Zenfone Lite L1' , 306, 'Asus mobile phones ', 133);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5466, 'Asus Zenfone Max Plus' , 306, 'Asus mobile phones ', 399);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5467, 'Huawei Honor WaterPlay 8' , 306, 'Huawei mobile phones ', 355 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5468, 'Huawei Honor Magic 2' , 306, 'Huawei mobile phones ', 888);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5469, 'Huawei Enjoy 9 Plus' , 306, 'Huawei mobile phones ', 422);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5470, 'Huawei Enjoy Max' , 306, 'Huawei mobile phones ', 355);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5471, 'Motorola Moto P30 Note' , 306, 'Motorola mobile phones ', 444);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5472, 'Motorola One Power' , 306, 'Motorola mobile phones ', 577);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5473, 'Motorola One' , 306, 'Motorola mobile phones ', 555);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5474, 'Motorola Moto P30' , 306, 'Motorola mobile phones ', 488);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5475, 'Motorola Moto Z3' , 306, 'Motorola mobile phones ', 733);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5476, 'LG V40 ThinQ' , 306, 'LG mobile phones ', 1555 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5477, 'LG Q Stylus+' , 306, 'LG mobile phones ', 488);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5478, 'LG G7 Fit' , 306, 'LG mobile phones ', 555 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price)
- VALUES (5479, 'Xiaomi Mi MIX 3' , 306, 'Xiaomi mobile phones', 777);
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5480, 'Xiaomi Black Shark Helo' , 306, 'Xiaomi mobile phones', 866 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5481, 'Panasonic P85 NXT' , 306, 'Panasonic mobile phones', 155 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5482, 'Panasonic Eluga Z1 Pro' , 306, 'Panasonic mobile phones', 388 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5483, 'Huawei WATCH GT' , 306, 'Huawei Smartwatches', 230 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5484, 'Samsung Galaxy Watch 42mm 2018' , 306, 'Samsung Smartwatches', 349 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5485, 'Apple Watch Series 4' , 306, 'Apple Smartwatches', 399 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5486, 'Apple Watch Series 3' , 306, 'Apple Smartwatches', 329 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5487, 'Samsung Gear Sport' , 306, 'Samsung Smartwatches', 399 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5488, 'Huawei Band 3 Pro' , 306, 'Huawei Smartwatches', 113 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5489, 'Acer Predator Helios 300 Gaming Laptop' , 306, 'Acer Laptops', 1199 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5490, 'Acer Aspire E 15 ' , 306, 'Acer Laptops', 359 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5491, 'Acer Flagship CB3-532 15.6"' , 306, 'Acer Laptops', 133 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5492, 'ASUS Chromebook C202SA-YS02 11.6' , 306, 'ASUS Laptops', 218 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5493, 'ASUS VivoBook F510UA 15.6' , 306, 'ASUS Laptops', 509 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5494, 'ASUS C302CA-DHM4 Chromebook' , 306, 'ASUS Laptops', 474 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5495, 'Samsung Chromebook 3' , 306, 'Samsung Laptops', 193 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5496, 'Lenovo Ideapad 2019 15.6 HD Laptop Notebook Computer' , 306, 'Lenovo Laptops', 309 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5497, 'ROG Zephyrus S Ultra Slim Gaming Laptop' , 306, 'ASUS Laptop', 1899 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5498, '2018 Lenovo Flex 5 15.6' , 306, 'Lenovo Laptops', 849 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5499, '2018 Lenovo ThinkPad T480 14' , 306, 'Lenovo Laptops', 839 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5500, 'Razer Blade 15: Worlds Smallest 15.6' , 306, 'Razer Laptops', 1899 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5501, 'Samsung Galaxy Tab A' , 306, 'Samsung Tablets', 250 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5502, 'Samsung Galaxy Tab A 10.5' , 306, 'Samsung Tablets', 450 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5503, 'Samsung Galaxy Tab S4' , 306, 'Samsung Tablets', 650 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5504, 'Apple iPad Pro 11-inch' , 306, 'Apple Tablets', 1699 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5505, 'Apple iPad Pro 12.9-inch (2018)' , 306, 'Apple Tablets', 1899 );
- INSERT INTO Products (product_id, product_name, supplier_id, product_type,product_price )
- VALUES (5506, 'Apple iPad 9.7-inch (2018)' , 306, 'Apple Tablets', 559 );
- Select * from Products
- -- removed product_id as it mathces product_type_id
- create table Product_types (
- product_type_id int,
- product_name varchar(50),
- );
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES ( 10001,'Apple mobile phones');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES ( 10002,'Samsung mobile phones');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES ( 10003,'Lenovo mobile phones');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES ( 10004,'Nokia mobile phones');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES ( 10005,'Sony mobile phones');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES ( 10006,'Blackberry mobile phones');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES ( 10007,'Asus mobile phones');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES ( 10008,'Huawei mobile phones');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES (10009,'Motorola mobile phones');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES (10010,'LG mobile phones');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES (10011,'Xiaomi mobile phones');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES (10012,'Panasonic mobile phones');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES (10013,'Huawei Smartwatches');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES (10014,'Samsung Smartwatches');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES (10015,'Acer Laptops');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES (10016,'ASUS Laptops');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES (10017,'Samsung Laptops');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES (10018,'Lenovo Laptops');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES (10019,'Razer Laptops');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES (10020,'Samsung Tablets');
- INSERT INTO Product_types (product_type_id, product_name )
- VALUES (10021,'Apple Tablets');
- select * from Product_types
- create table Suppliers (
- supplier_id int,
- supplier_name varchar(255),
- supplier_phone varchar(10),
- supplier_email varchar(255),
- other_details text
- );
- create table Customers (
- customer_id int,
- customer_fname varchar(50),
- customer_lname varchar(50),
- customer_phone varchar(20),
- customer_email varchar(50),
- );
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (301,'Dragomir','Antonov','(0913) 107-225','zeller@sbcglobal.net');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (302,'Vladislav','Valchev','(0778) 734-072','bdbrown@mac.com');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (303,'Svilen','Bukhalov','(0913) 107-225','suresh@comcast.net');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (304,'Tihomir','Mladenov','(0544) 842 454','saridder@me.com');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (305,'Hristo','Penchev','+359(0)723 363 416','webinc@yahoo.ca');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (306,'Lyutskan','Vitanov','0159 471882','budinger@me.com');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (307,'Zayko','Georgiev','0948 529-784','noodles@yahoo.ca');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (308,'Vezenko','Mihailov','0373061973','mrsam@gmail.com');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (309,'Zhelyazko','Svetkov','+359(0)137 221087','goresky@aol.com');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (310,'Kaloyan','Gavrilov','0641 685879','citizenl@msn.com');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (311,'Dako','Karapetrov','(0616) 952 115','engelen@me.com');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (312,'Preslava','Teodorova','(0978) 055279','mahbub@att.net');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (313,'Trayana','Zdravkova','0255841577','jguyer@verizon.net');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (314,'Plamena','Nikolova','(0774) 134403','research@me.com');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (315,'Branimira','Yankova','0695168677','parasite@icloud.com');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (316,'Assen ','Savov','(0651) 216 260','lstaf@gmail.com');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (317,'Bilka','Ivanova','(0322) 137 8515','hamilton@comcast.net');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (318,'Stoyan','Kamenov','(0599) 738 276','breegster@gmail.com');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (319,'Detelin','Atanasov','+359410879882','dkasak@live.com');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (320,'Emil','Tanev','(0653) 900-916','bulletin@yahoo.ca');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (321,'Mitko','Evgeniev','+359252691883','dburrows@comcast.net');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (322,'Kostadin','Iliev','(0642) 336-656','cliffski@optonline.net');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (323,'Krasimir ','Mihaelov','+359410879882','guialbu@msn.com');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (324,'Galin','Bozhidarov','+359830757245','airship@icloud.com');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (325,'Ventsislav','Hadjiev','(0750) 631-825','ninenine@aol.com');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (326,'Bogomil','Samuilov','0984 247-661','giafly@msn.com');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (327,'Blaga','Dimitrova','(0339) 465-680','jimmichie@verizon.net');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (328,'Zornitsa','Todorova','0240 723-634','heine@att.net');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (329,'Miroslava ',' Popova','(0387) 211681','kayvonf@yahoo.com');
- INSERT INTO Customers(customer_id , customer_fname,customer_lname,customer_phone,customer_email )
- VALUES (30,'Nadezhda ','Dineva','8008135','notfake@gmail.com');
- select * from Customers
- create table Orders (
- order_id int,
- customer_id int,
- order_day_date date,
- );
- create table Customer_addresses (
- customer_address_id int,
- customer_id int,
- address_id int,
- );
- create table Order_items (
- order_id int,
- product_id int,
- quantity int
- );
- create table Deliveries (
- delivery_id int,
- delivered_by_employee_id int,
- order_id int,
- delivery_date_time date,
- other_delivery_details text
- );
- create table Employees (
- employee_id int,
- employee_name varchar(255),
- employee_phone varchar(10),
- other_employee_details text
- );
- create table Calendar (
- day_date date,
- day_of_the_week varchar(10)
- );
- create table Addresses (
- steet varchar(50),
- city varchar(20),
- country varchar(20),
- other_address_details text
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement