Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please solve 14 correctly 1. Create the following tables size Customer Field name custNo chame city gender phone Item Data type Number Varchar2 Varchar2 Char

please solve 14 correctly
image text in transcribed
image text in transcribed
image text in transcribed
1. Create the following tables size Customer Field name custNo chame city gender phone Item Data type Number Varchar2 Varchar2 Char Varchar2 Note 3 PK 25 Unique 12 1 Morf Field name Data type Size Note itemNo Number 3 PK Unit Price Number 6,2 Orders Field name Data type Size Note 1 CMP5352-Soing 351-HW-2 3 PK NN 3 FK-Customer 5 size Note 3 PK 3 FK-Item 5 Order No Number Odate Date Custo Number Ord amt Number Order Item Field name Data type Order No Number Item No Number Qty Number Shipment Field name Datatype Order No Number WarehouseNo Varchar2 Date Warehouse Field name Data type Warehouse No Varchar2 City Varchar2 size Note 3 PK 3 FK-Warehouse Ship date size Note 3 PK 12 2. Create sequence for customer number start with 11 maximum value 999 and Increment by 11, use this sequence when insert values to the customer table. 3. Create sequence for order number start with 21, end with 99, use this sequence when Insert values to the orders table, 4. Create sequence for item number, use this sequence when insert values to the item table. 5. Fill the table by following data: Customer custNo 11 22 33 chame SARA FATMA OMAR City DOHA DOHA gender phone F 111111 F 222222 M 333333 KHOR 2 CMPS3S2-Sping 351-HW-2 ALI HASSAN SHIMAL KHOR M M 444444 555555 44 55 Orders Order No Ord amt 21 22 23 24 25 Odate CustNo 3/4/2002 9/3/2004 23/01/2001 11/8/2008 6/10/2010 11 22 33 44 55 100 110 140 160 200 Item Tin Qty 200 200 250 300 Item No UnitPrice 1 1100 2 1200 3 1300 4 1400 5 1500 order_item Order No Item No 21 1 25 5 22 2 24 4 23 3 shipment Order No WarehouseNo 21 W1 25 W2 22 W3 24 W4 23 Ws Warehouse WarehouseNo City W1 NAJMA W2 KHOR DOHA 600 Ship date 1/11/2002 24/12/2010 13/5/2005 16/9/2008 28/4/2001 W3 W4 W5 MUNTZA RAYAAN 6. Create view customers_vw for all customers with their orders. 7. Create a view warehouse_vw for the warehouse information from which the customer named FATMA was supplied her orders. Produce a listing: orderNo, WarehouseNo. 8. Create a view summary_vw for cname, No_of_orders, Avg_order_amt, where the middle column is the total number of orders and last column is the average order amount for that customer. 9. Create a query to display the order No and Ship_date for all orders shipped from warehouseNo W2. 10. Create a query to display the orders that were not shipped within 365 days of ordering. 11. Create a query to display the orderNo for orders that were shipped from all warehouse that is in RAYAAN. 12. Find the item with the maximum unit price. 13.List all customer names whose orders were shipped from a warehouse in the same city as they live in. 14.Delete all orders for customer named SARA. 15.Delete all items from order_item that have a price greater than the average price. 16.All customers who lived in DOHA, are moved to MAUITHER. 17.Increase price for all item by 25%

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

The Audit Principle 5 Powerful Steps To Align Your Life With The Laws Of Success

Authors: Jane Ann Craig

1st Edition

1732729107, 978-1732729100

More Books

Students also viewed these Accounting questions

Question

6. Can a firm with positive net income run out of cash? Explain.

Answered: 1 week ago