Based of the Cape Codd learning database, only some solutions can be found in Da
ID: 3812851 • Letter: B
Question
Based of the Cape Codd learning database, only some solutions can be found in Database processing 13th and 14th edition. These are the ones that caould not be found.
1. Create a VIEW to display the SKU, SKU_Description, WarehouseID, WarehouseCity, and WarehouseState of all items not stored in the Atlanta, Bangor, or Chicago warehouse. Provide a screenshot of the records in the view as well.
2. Create a VIEW to show the SKU, SKU_Description, and WarehouseID for all items stored in a warehouse managed by ‘Lucille Smith’. Use an implicit/explicit join. Provide a screenshot of the records in the view as well.
3. Create a VIEW to join WAREHOUSE and INVENTORY and include all rows of WAREHOUSE in your answer, regardless of whether they have any INVENTORY. Provide a screenshot of the records in the view as well.
4. Write an SQL statement to display the SKU, SKU_Description, and Department of all SKUs that appear in either the Cape Codd 2013 Catalog (either in the printed catalog or on the Web site) or the Cape Codd 2014 Catalog (either in the printed catalog or on the Web site) or both. NOTE: If it’s on the website, then the catalogpage is null.
Explanation / Answer
1. Create a VIEW to display the SKU, SKU_Description, WarehouseID, WarehouseCity, and WarehouseState of all items not stored in the Atlanta, Bangor, or Chicago warehouse.
A)
Create or replace view sku_view as select SKU, SKU_Description, w.WarehouseID,w.WarehouseCity,w.WarehouseState from inventory, Warehouse w where SKU=w.SKU and w.Warehousestate not in("Atlanta", "Bangor", "Chicago");
This qwery retrieves all the SKU, SKU_Description, WarehouseID, WarehouseCity, and WarehouseState fields which the SKU in inventory matches with warehouse table's SKU of which items are not stored in locations Atlanta, Bangor, or Chicago warehouse
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.