CREATE TABLE CUSTOMER ( CUS_CODE INTEGER PRIMARY KEY, CUS_LNAME VARCHAR (15) NOT NULL, CUS FNAME VARCHAR (15) NOT NULL, CUS_INIT IAL CHAR (1), CUS AREACODE CHAR (3), CUS PHONE CHAR (8) NOT NULL, CUS_BALANCE NUMERIC \( (9,2) \) DEFAULT \( 0.00 \), CONSTRAINT CUS_UI1 UNIQUE (CUS_LNAME, CUS_FNAME, CUS_PHONE)); CREATE TABLE INVOICE ( INV_NUMBER INTEGER PRIMARY KEY, CUS_CODE INTEGER NOT NULL,
INSERT IGNORE INTO VENDOR VALUES (21231, 'D\&E Supply', ,'Singh', '615', '228\( 3245^{\prime}, ' T^{\prime} \) ', 'Y' ' ; INSERT IGNORE INTO VENDOR VALUES (21344,' Gomez Bros.', ,'Ortega', , '615','889\( \left.2546^{\prime}, ' K Y^{\prime}, '{ }^{\prime}{ }^{\prime}\right) ; \) INSERT IGNORE INTO VENDOR VALUES (22567, 'Dome Supply', ,'Smith', , '901', '678\( 1419^{\prime}, '{ }^{\prime} \mathrm{GA}^{\prime},{ }^{\prime} \mathrm{N}^{\prime} \) ); INSERT IGNORE INTO VENDOR VALUES (23119, 'Randsets Ltd.', , 'Anderson', '901', '678\( 3998^{\prime}, '{ }^{\prime} \mathrm{GA}^{\prime},{ }^{\prime}{ }^{\prime} \) ) ; INSERT IGNORE INTO VENDOR VALUES (24004, 'Brackman Bros.', ' 'Browning', '615',' \( 228- \) \( \left.1410^{\prime}, '{ }^{\prime} \mathrm{TN}^{\prime},{ }^{\prime} \mathrm{N}^{\prime}\right) \); \( 0093^{\prime}, '{ }^{\prime} L^{\prime},{ }^{\prime} \mathrm{N}^{\prime} \) ) ; INSERT IGNORE INTO VENDOR VALUES (25501, 'Damal Supplies', 'Smythe', , '615', '890\( 3529^{\prime}, '{ }^{\prime} \mathrm{TN}^{\prime},{ }^{\prime} \mathrm{N}^{\prime} \) ); INSERT IGNORE INTO VENDOR VALUES (25595, 'Rubicon Systems', 'Orton', ', 904 ', '456\( 0092^{\prime}, '{ }^{\prime} L^{\prime}, ' Y^{\prime} \) ); / * PRODUCT rOWS r INSERT IGNORE INTO PRODUCT VALUES('11QER/31', 'Power painter, 15 psi., 3-nozzle' , \( \left.2017-11-03^{\prime}, \quad 8, \quad 5,109.99,0.00,25595\right) ; \) INSERT IGNORE INTO PRODUCT VALUES (' \( 13-\mathrm{Q} 2 / \mathrm{P} 2^{\prime}, \prime 7.25-1 \mathrm{n} \). pwr. saw blade' ' \( \left.2017-12-13^{\prime}, 32,15,14.99,0.05,21344\right) ; \) INSERT IGNORE INTO PRODUCT VALUES ('14-Q1/L3','9.00-in. pwr. saw blade' , \( \left.2017-11-13^{\prime}, 18,12,17.49,0.00,21344\right) ; \) INSERT IGNORE INTO PRODUCT VALUES ('1546-QQ2', 'Hrd. cloth, 1/4-in., 2x50' , \( \left.2018-01-15^{\prime}, 15, \quad 8,39.95,0.00,23119\right) ; \) INSERT IGNORE INTO PRODUCT VALUES('1558-QW1', 'Hrd. cloth, 1/2-in., 3x50' , \( \left.2018-01-15^{\prime}, 23,5,43.99,0.00,23119\right) ; \) INSERT IGNORE INTO PRODUCT VALUES('2232/QTY', 'B\&D jigsaw, 12-in. blade' , \( \left.2017-12-30^{\prime}, \quad 8, \quad 5,109.92,0.05,24288\right) ; \) INSERT IGNORE INTO PRODUCT VALUES ('2232/QWE', 'B\&D jigsaw, 8-in. blade' \( \left.\prime^{\prime} 2017-12-24^{\prime}, 6,5,99.87,0.05,24288\right) ; \) INSERT IGNORE INTO PRODUCT VALUES ('2238/QPD', 'B\&D cordless drill, 1/2-in.' , \( \left.2018-01-20^{\prime}, 12,5,38.95,0.05,25595\right) \); INSERT IGNORE INTO PRODUCT VALUES ('23109-HB', 'Claw hammer' \( \left.,^{\prime} 2018-01-20^{\prime}, 23,10,9.95,0.10,21225\right) \); INSERT IGNORE INTO PRODUCT VALUES ('23114-AA', 'Sledge hammer, 12 lb.' \( \prime^{\prime} 2018-01-02^{\prime}, 8,5,14.40,0.05 \), NULL); INSERT IGNORE INTO PRODUCT VALUES('54778-2T',' Rat-tail file, 1/8-in. fine' \( \left.,^{\prime} 2017-12-15^{\prime}, 43,20,4.99,0.00,21344\right) ; \) INSERT IGNORE INTO PRODUCT VALUES('89-WRE-Q', 'Hicut chain saw, 16 in.' ,'2018-02-07', 11, 5,256.99,0.05,24288); INSERT IGNORE INTO PRODUCT VALUES ('PVC23DRT', 'PVC pipe, 3.5-in., 8-ft' ' \( 2018-02-20^{\prime}, 188,75,5.87,0.00 \), NULL ) ; INSERT IGNORE INTO PRODUCT VALUES ('SM-18277',' '1.25-in. metal screw, \( 25^{\prime} \) ' , \( \left.2018-03-01^{\prime}, 172,75,6.99,0.00,21225\right) \); INSERT IGNORE INTO PRODUCT VALUES ('SW-23116','2.5-in. wd. screw, 50' ,' \( \left.2018-02-24^{\prime}, 237,100,8.45,0.00,21231\right) \); INSERT IGNORE INTO PRODUCT VALUES('WR3/TT3', 'steel matting, \( 4^{\prime}{ }^{\prime} \times 8^{\prime}{ }^{\prime} \times 1 / 6^{\prime \prime}, .5^{\prime \prime} \) mesh', '2018-01-17', 18, 5,119.95,0.10,25595);
INSERT IGNORE INTO VENDOR VALUES (21231, 'D\&E Supply', ,'Singh', '615', '228\( 3245^{\prime}, ' T^{\prime} \) ', 'Y' ' ; INSERT IGNORE INTO VENDOR VALUES (21344,' Gomez Bros.', ,'Ortega', , '615','889\( \left.2546^{\prime}, ' K Y^{\prime}, '{ }^{\prime}{ }^{\prime}\right) ; \) INSERT IGNORE INTO VENDOR VALUES (22567, 'Dome Supply', ,'Smith', , '901', '678\( 1419^{\prime}, '{ }^{\prime} \mathrm{GA}^{\prime},{ }^{\prime} \mathrm{N}^{\prime} \) ); INSERT IGNORE INTO VENDOR VALUES (23119, 'Randsets Ltd.', , 'Anderson', '901', '678\( 3998^{\prime}, '{ }^{\prime} \mathrm{GA}^{\prime},{ }^{\prime}{ }^{\prime} \) ) ; INSERT IGNORE INTO VENDOR VALUES (24004, 'Brackman Bros.', ' 'Browning', '615',' \( 228- \) \( \left.1410^{\prime}, '{ }^{\prime} \mathrm{TN}^{\prime},{ }^{\prime} \mathrm{N}^{\prime}\right) \); \( 0093^{\prime}, '{ }^{\prime} L^{\prime},{ }^{\prime} \mathrm{N}^{\prime} \) ) ; INSERT IGNORE INTO VENDOR VALUES (25501, 'Damal Supplies', 'Smythe', , '615', '890\( 3529^{\prime}, '{ }^{\prime} \mathrm{TN}^{\prime},{ }^{\prime} \mathrm{N}^{\prime} \) ); INSERT IGNORE INTO VENDOR VALUES (25595, 'Rubicon Systems', 'Orton', ', 904 ', '456\( 0092^{\prime}, '{ }^{\prime} L^{\prime}, ' Y^{\prime} \) ); / * PRODUCT rOWS r INSERT IGNORE INTO PRODUCT VALUES('11QER/31', 'Power painter, 15 psi., 3-nozzle' , \( \left.2017-11-03^{\prime}, \quad 8, \quad 5,109.99,0.00,25595\right) ; \) INSERT IGNORE INTO PRODUCT VALUES (' \( 13-\mathrm{Q} 2 / \mathrm{P} 2^{\prime}, \prime 7.25-1 \mathrm{n} \). pwr. saw blade' ' \( \left.2017-12-13^{\prime}, 32,15,14.99,0.05,21344\right) ; \) INSERT IGNORE INTO PRODUCT VALUES ('14-Q1/L3','9.00-in. pwr. saw blade' , \( \left.2017-11-13^{\prime}, 18,12,17.49,0.00,21344\right) ; \) INSERT IGNORE INTO PRODUCT VALUES ('1546-QQ2', 'Hrd. cloth, 1/4-in., 2x50' , \( \left.2018-01-15^{\prime}, 15, \quad 8,39.95,0.00,23119\right) ; \) INSERT IGNORE INTO PRODUCT VALUES('1558-QW1', 'Hrd. cloth, 1/2-in., 3x50' , \( \left.2018-01-15^{\prime}, 23,5,43.99,0.00,23119\right) ; \) INSERT IGNORE INTO PRODUCT VALUES('2232/QTY', 'B\&D jigsaw, 12-in. blade' , \( \left.2017-12-30^{\prime}, \quad 8, \quad 5,109.92,0.05,24288\right) ; \) INSERT IGNORE INTO PRODUCT VALUES ('2232/QWE', 'B\&D jigsaw, 8-in. blade' \( \left.\prime^{\prime} 2017-12-24^{\prime}, 6,5,99.87,0.05,24288\right) ; \) INSERT IGNORE INTO PRODUCT VALUES ('2238/QPD', 'B\&D cordless drill, 1/2-in.' , \( \left.2018-01-20^{\prime}, 12,5,38.95,0.05,25595\right) \); INSERT IGNORE INTO PRODUCT VALUES ('23109-HB', 'Claw hammer' \( \left.,^{\prime} 2018-01-20^{\prime}, 23,10,9.95,0.10,21225\right) \); INSERT IGNORE INTO PRODUCT VALUES ('23114-AA', 'Sledge hammer, 12 lb.' \( \prime^{\prime} 2018-01-02^{\prime}, 8,5,14.40,0.05 \), NULL); INSERT IGNORE INTO PRODUCT VALUES('54778-2T',' Rat-tail file, 1/8-in. fine' \( \left.,^{\prime} 2017-12-15^{\prime}, 43,20,4.99,0.00,21344\right) ; \) INSERT IGNORE INTO PRODUCT VALUES('89-WRE-Q', 'Hicut chain saw, 16 in.' ,'2018-02-07', 11, 5,256.99,0.05,24288); INSERT IGNORE INTO PRODUCT VALUES ('PVC23DRT', 'PVC pipe, 3.5-in., 8-ft' ' \( 2018-02-20^{\prime}, 188,75,5.87,0.00 \), NULL ) ; INSERT IGNORE INTO PRODUCT VALUES ('SM-18277',' '1.25-in. metal screw, \( 25^{\prime} \) ' , \( \left.2018-03-01^{\prime}, 172,75,6.99,0.00,21225\right) \); INSERT IGNORE INTO PRODUCT VALUES ('SW-23116','2.5-in. wd. screw, 50' ,' \( \left.2018-02-24^{\prime}, 237,100,8.45,0.00,21231\right) \); INSERT IGNORE INTO PRODUCT VALUES('WR3/TT3', 'steel matting, \( 4^{\prime}{ }^{\prime} \times 8^{\prime}{ }^{\prime} \times 1 / 6^{\prime \prime}, .5^{\prime \prime} \) mesh', '2018-01-17', 18, 5,119.95,0.10,25595);
INSERT IGNORE INTO EMP VALUES (100, 'Mr.',' 'Kolmycz', ''George', 'D', '1942-06\( 15^{\prime} \), '1985-03-15', '615', '324-5456', NULL) ; INSERT IGNORE INTO EMP VALUES(101, 'Ms.', 'Lewis', ,'Rhonda', 'G', '1965-03\( 19 ', ' 1986-04-25^{\prime}, ' 615^{\prime} \) ' '324-4472', 100); INSERT IGNORE INTO EMP VALUES(102, 'Mr.',' 'Vandam'? , 'Rhett', ,NULL, '1958-1114 ', '1990-12-20','901', '675-8993', 100); 08', '1994-10-20',' 901 ', '504-4430', 105); INSERT IGNORE INTO EMP VALUES(105, 'Mr.',' 'Williams', 'Robert', 'D', '1975-03- \( 144^{\prime}, ' 1998-11-08^{\prime}, ' 615^{\prime}, ' 890-3220^{\prime} \) ',NULL); INSERT IGNORE INTO EMP VALUES(106, 'Mrs.','Smith', ,Jeanine', 'K', '1968-02- \( 12^{\prime} \) ',1989-01-05', '615','324-7883', 105); INSERT IGNORE INTO EMP VALUES(107, 'Mr.',' 'Diante'?'Jorge', ' D', '1974-08\( \left.21^{\prime}, ' 1994-07-02^{\prime}, ' 615^{\prime}, ' 890-4567 ', 105\right) \); INSERT IGNORE INTO EMP VALUES(108, 'Mr.',' 'Wiesenbach', 'Paul', ' 'R', '1966-0214 ', '1992-11-18', '615', '897-4358', NULL); INSERT IGNORE INTO EMP VALUES \( (109 \), 'Mr.',''Smith', 'George', 'K', '1961-06- \( 11^{\prime} \) ','1989-04-14',' INSERT IGNORE INTO EMP VALUES \( (110 \), , 'Mrs.','Genkazi', ,'Leighla', 'W', '1970-05\( 19^{\prime}, ' 1990-12-01^{\prime}, ' 901^{\prime} \), '569-0093', 108); INSERT IGNORE INTO EMP VALUES(111, 'Mr.',' 'Washington', 'Rupert', 'E', '1966-01\( \left.03^{\prime}, ' 1993-06-21^{\prime}, ' 615^{\prime}, ' 890-4925^{\prime}, 105\right) \); INSERT IGNORE INTO EMP VALUES (112, 'Mr.',' 'Johnson'? 'Edward', 'E', '1961-05\( \left.144^{\prime}, ' 1983-12-01^{\prime}, ' 615^{\prime}, ', 898-4387^{\prime}, 100\right) \); INSERT IGNORE INTO EMP VALUES(113, 'Ms.',' 'Smythe'? 'Melanie', 'P', '1970-0915','1999-05-11', '615', '324-9006', 105); INSERT IGNORE INTO EMP VALUES(114,'Ms.',' 'Brandon', 'Marie', 'G', '1956-1102',' '1979-11-15', ' 901 ', '882-0845', 108); INSERT IGNORE INTO EMP VALUES(115, 'Mrs,','Saranda', 'Hermine', 'R', '1972-0725','1993-04-23', '615','324-5505', 105); INSERT IGNORE INTO EMP VALUES(116,'Mr.','Smith'? ,'George', 'A', '1965-1108','1988-12-10','615','890-2984', 108); /* EMPLOYEE YOWS INSERT IGNORE INTO EMPLOYEE VALUES \( (100, ' \mathrm{Mr}, ', ' \) Kolmycz', ,'George', ' ' ' ', '1942INSERT IGNORE INTO EMPLOYEE VALUES (100,' Mr.' ',' ' INSERT IGNORE INTO EMPLOYEE VALUES (101, 'Ms.', 'Lewis'?'Rhonda', 'G', '1965\( \left.03-19^{\prime}, ' 1986-04-25,16, ' 615 ', 324-4472^{\prime}{ }^{\prime}\right) \); INSERT IGNORE INTO EMPLOYEE VALUES \( (102 \), 'Mr.', 'Vandam'? ' 'Rhett'?NULL,'1958- 11-14', '1990-12-20', \( 12, ' 901 \) ', '675-8993') ; INSERT IGNORE INTO EMPLOYEE VALUES (103,'Ms.', 'Jones', ,'Anne', ,'M', ,1974- \( 10-16^{\prime}, ' 1994-08-28 ' \), INSERT IGNORE INTO EMPLOYEE VALUES \( (104, ' \mathrm{Mr} \mathrm{} \) INSERT IGNORE INTO EMPLOYEE VALUES (105,'Mr.',' 'Williams', 'Robert', 'D', ,'197503-14','1998-11-08', 4,'615','890-3220'); INSERT IGNORE INTO EMPLOYEE VALUES (106,'Mrs.','Smith', ,'Jeanine', 'K', '196802-12',' 1989-01-05', 14,' 615', '324-7883'); INSERT IGNORE INTO EMPLOYEE VALUES (107,'Mr.',' 'Diante', ,'Jorge', , ' ', ,197408-21','1994-07-02', 8,'615','890-4567'); INSERT IGNORE INTO EMPLOYEE VALUES (108, 'Mr.',' 'Wiesenbach', 'Paul', ,'R', '1966\( \left.02-14^{\prime}, ' 1992-11-18^{\prime}, 10, ' 615^{\prime}, ' 897-4358^{\prime}\right) ; \)
INSERT IGNORE INTO EMPLOYEE VALUES (109,'Mr.', 'Smith', 'George', 'K', '196106-18','1989-04-14',13,'901','504-3339'); INSERT IGNORE INTO EMPLOYEE VALUES (110,'Mrs.', 'Genkazi', 'Leighla', 'W', '197005-19','1990-12-01', 12,'901','569-0093'); INSERT IGNORE INTO EMPLOYEE VALUES (111, 'Mr.', 'Washington', 'Rupert', 'E', '196601-03','1993-06-21', 9,'615','890-4925'); INSERT IGNORE INTO EMPLOYEE VALUES (112, 'Mr.', 'Johnson', 'Edward', 'E', '196105-14','1983-12-01', 19,'615', '898-4387'); INSERT IGNORE INTO EMPLOYEE VALUES (113,'Ms.', 'Smythe', 'Melanie', 'P', '197009-15','1999-05-11', 3,'615','324-9006'); INSERT IGNORE INTO EMPLOYEE VALUES(114,'Ms.', 'Brandon', 'Marie', ' 'G', '195611-02', '1979-11-15', 23,'901', '882-0845'); INSERT IGNORE INTO EMPLOYEE VALUES (115, 'Mrs.','Saranda', 'Hermine', 'R', '197207-25', '1993-04-23', 9,'615','324-5505'); INSERT IGNORE INTO EMPLOYEE VALUES (116,'Mr.','Smith', 'George', 'A', '196511-08', '1988-12-10', 14,' 615', '890-2984');
Q5. Write a query that summarizes the value of products currently in inventory. Note that the value of each product is a result of multiplying the units currently in inventory by the unit price. Sort the results in descending order by subtotal. Query: Screenshot of results: Q6. Find the total value of the product inventory. Query: Screenshot of results: Q7. List all products ordered by Kathy Smith. Query: Screenshot of results: