Answered step by step
Verified Expert Solution
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:
CapeCodd:
SKUDATA SKU SKUDescription, Department, Buyer
INVENTORY SKU Warehouse, SKUDescription, QuantityOnHand, QuantityOnOrder
WAREHOUSE WarehouseID WarehouseCity, WarehouseState, Manager, SquareFeet
CATALOGSKUCatalogID SKU, SKUDescription, Department, CatalogPage, DateOnWebSite
BUYER BuyerName Department, Position, Supervisor
RETAILORDER OrderNumber StoreNumber, StoreZip, OrderMonth, OrderYear, OrderTotal
MDC:
INVOICE InvoiceNumber CustomerID, DateIn, DateOut, TotalAmount
CUSTOMER CustomerID FirstName, LastName, Phone, EmailAddress, ReferredBy
INVOICEITEM InvoiceNumber ItemNumber, Item, Quantity, UnitPrice
Exercise : Using Cape Codd Database:
Write an SQL statement that calculates the minimum and maximum square feet of the warehouses in the WAREHOUSE table.
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.
Show the OrderNumber for the items stored in from table RetailOrder.
Show the SKUDescription for the order item that has the maximum QuantityOnOrder.
Write an SQL statement to show the WarehouseID and average QuantityOnHand of all items stored in a warehouse managed by Lucille Smith
Write an SQL statement to display the SKU and SKUDescription of orders that have the order number of
Exercise : 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.
Determine the maximum and minimum TotalAmounts from the Invoice.
Count the number of customers.
Determine the average TotalAmount. The output result should only have digits after the decimal point.
Show the FirstName and LastName of all customers who have had an order with TotalAmount greater than Use a subquery. Present the results sorted by LastName in ascending order and then FirstName in descending order.
Show the FirstName and LastName of all customers who have had an order with an Item named Dress ShirtPresent 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
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