Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use the following tables to solve the below questions: Cape _ Codd: - SKU _ DATA ( SKU , SKU _ Description, Department, Buyer )

Use the following tables to solve the below questions:
Cape_Codd:
- SKU_DATA (SKU, SKU_Description, Department, Buyer)
- INVENTORY (SKU, Warehouse, SKU_Description, QuantityOnHand, QuantityOnOrder)
- WAREHOUSE (WarehouseID, WarehouseCity, WarehouseState, Manager, SquareFeet)
- CATALOG_SKU_2021(CatalogID, SKU, SKU_Description, Department, CatalogPage, DateOnWebSite)
- BUYER (BuyerName, Department, Position, Supervisor)
- RETAIL_ORDER (OrderNumber, StoreNumber, StoreZip, OrderMonth, OrderYear, OrderTotal)
MDC:
- INVOICE (InvoiceNumber, CustomerID, DateIn, DateOut, TotalAmount)
- CUSTOMER (CustomerID, FirstName, LastName, Phone, EmailAddress, ReferredBy)
- INVOICE_ITEM (InvoiceNumber, ItemNumber, Item, Quantity, UnitPrice)
E111xercise 1: Using Cape Codd Database:
1. Write an SQL statement that calculates the minimum and maximum square feet of the warehouses in the WAREHOUSE table.
2. Write an SQL statement to produce a single column called WarehouseManager that combines the Manager, the phrase manages the Warehouse ID , WarehouseID, Located in , and WarehouseCity. Try it once by removing any leading or trailing blanks and once without.
3. Show the OrderNumber for the items stored in 2020 from table Retail_Order.
4. Show the SKU_Description for the order item that has the maximum QuantityOnOrder.
5. Write an SQL statement to show the WarehouseID and average QuantityOnHand of all items stored in a warehouse managed by Lucille Smith.
6. Write an SQL statement to display the SKU and SKU_Description of orders that have the order number of 3000.
Exercise 2: Using Marcias Dry Cleaning (MDC) Database:
First make sure that you create a schema for this database, call it (mdc), give it the privileges required. Then execute the create tables and insert data scripts.
7. Determine the maximum and minimum TotalAmounts from the Invoice.
8. Count the number of customers.
9. Determine the average TotalAmount. The output result should only have 2 digits after the decimal point.
10. Show the FirstName and LastName of all customers who have had an order with TotalAmount greater than 90. Use a subquery. Present the results sorted by LastName in ascending order and then FirstName in descending order.
11. Show the FirstName and LastName of all customers who have had an order with an Item named Dress Shirt.Present the results sorted by LastName in ascending order and then FirstName in descending order.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago