Question: Please provide mySQL codes for 1-7. Use the cape_codd database for questions 1-6. 1. Write a SQL query that displays the sum of the QuantityOnHand

 Please provide mySQL codes for 1-7. Use the cape_codd database for
questions 1-6. 1. Write a SQL query that displays the sum of
Please provide mySQL codes for 1-7.

Use the cape_codd database for questions 1-6. 1. Write a SQL query that displays the sum of the QuantityOnHand column from the inventory table where the SKU is 100100 or 100200. Use a column alias of TanksinStock for the aggregate column. 2. Write a SQL query that displays the number of the rows in the retail_order table. Use a column alias of NumberOfOrders for the aggregate column 3. Write a SQL query that displays the number of rows in the catalog_sku_2015 table where CatalogPage is not null. Use a column alias of ItemsInCatalog for the aggregate column. 4. Write a SQL query that displays the number of rows of the inventory table where QuantityOnHand is greater than or equal to 500. Use a column alias of WellStocked for the aggregate column. 5. Write a SQL query that displays the average of the OrderTotal column from the retail_order table. Use a column alias of AverageOrderAmount for the aggregate column. 6. Write a SQL query that displays the min and max of the OrderTotal column in the retail_order table. Use a column alias of SmallestOrderAmount for the min and LargestOrderAmount for the max. Use the vrg database for question 7. 7. Write a SQL query that displays the TransactionID column and the difference between the Sales Price and Acquistion Price columns from the trans table. Use a column alias of ProfitAmount for the calculated column. Remove rows where the difference between the Sales Price and AcquisitionPrice is NULL

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!