Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2) Select all columns from orders table, then using a join, get the customer last name from customer table, and have it print in alphabetical
2) Select all columns from orders table, then using a join, get the customer last name from customer table, and have it print in alphabetical order by customer's last name.
3) Modify order #3 of the orders table. (Modify any of the attributes of order #3, such as order date, customer number, etc.)l print all data of the orders table before and after the modification.
4) Delete orders #18 and higher from, the orders table; print all data of the orders table before and after the deletion.
mysql> select from customer; +-------+- | Ename | LName | AcctNum +--- | Heidi | Wonder | 4552 | Sam | Goodwin | 3679 | Marge | Toledo | 1234 | Frank James | 5623 +-------+- 4 rows in set (0.00 sec) mysql> select * from orders; +------- | AcctNum | OrderNum OrderDate StoreNum Sales RepNum +----- -+----- | 4552 3 | 2004-01-03 | 1 11 | 3679 6 2004-01-05 1 | 1 | 1234 7 2004-01-07 1 | 2 | 5623 8 2004-01-09 1 12 | 4552 9 | 2004-01-11 | 1 13 | 3679 10 | 2004-01-13 | 1 3 | 1234 11 | 2004-01-15 | 1 | 1 15623 12 | 2004-01-17 | 1 | 2 | 4552 13 | 2004-01-19 | 1 13 | 3679 14 | 2004-01-21 | 1 3 | 1234 15 | 2004-01-23 1 | 2 | 5623 16 | 2004-01-25 | 1 11 | 4552 17 | 2004-01-27 1 | NULL +-- 13 rows in set (0.00 sec) mysql> select * from order_detail; +- ----- | OrderNum LineNum ProdNum | Qty | Color Unit Price - I | 1 1 1 31 1 | Bike28A 61 1 Bike28A 71 1 | Bike28A 1 | Bike28B 2 ridinggloves 91 1 Bike28B 101 1 | Bike28B 11 1 | Moped77 12 1 Bike31A 12 | 2 Helmet 13 | 1 Bike 31A 14 1 1 Bike28 15 | 1 | Bike28 Cruiser 16 | 1 | Bike28Schwinn 171 1 SchwinBike28Mountain +- 15 rows in set (0.00 sec) 1 | Red 2 Blue NULL | Green 3 Red 7 | White 2 Blue 5 | Green 1 | Black 1 | Red 4 | Red 1 | Blue 1 | Orange 3 | White 1 | Red 2 | Blue 300.00 259.00 525.00 455.00 60.00 255.00 199.00 955.00 525.00 75.00 455.00 255.00 199.00 955.00 855.00 + 1 | 1 1 1 1 1 1 | mysql> select * from product; | ProdNum | ProdName | ProdSupy | ColorGrp ProdCost +--- | Bike28 | standard29InBike | Generic | 8colors | NULL Bike28A | Trek 28 InBike | Trek | 8colors 1 NULL | Bike28B | Speedo 28 InBike | Speedo | 8colors 1 NULL Bike28Cruiser | Cruiser 28InBike | AmBike | 8colors NULL Bike28 Schwinn | Schwinn29InBike | Schwinn | 8colors 1 NULL Bike31A | Trek31InBike | Trek | 8colors NULLI Helmet i standardhelmet | AmManuf | RWB 1 NULL Moped77 | Moped77KPN | KPNEnterprise | WhtBlk NULL | ridinggloves | standardRidingGloves | RidingSuppInc | WhtBlk 1 NULL i SchwinBike2 BMountain i Schwinn2InMountainbike | Schwinn | 8colors NULL +---- 10 rows in set (0.00 sec) mysql> select * from salesrep; +----- --- Sales RepNum | SalesFName | SalesLName | SalesSSN SalesHDate SalesRate | SalesBonus 1 | 2 | 3 | Mike | Alice | Mary | Smith | Johnson | Halvorson | 222-33-4444 | 999-11-8888 | 333-00-9999 2001-01-01 2004-05-01 1 2004-06-01 251 27 1 221 4000.00 8000.00 NULL 3 rows in set (0.00 sec)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started