Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. Create sequence for customer number start with 1 and end with 999 . 4. Create view for all customers with their orders. 5. Create

image text in transcribed

3. Create sequence for customer number start with 1 and end with 999

. 4. Create view for all customers with their orders.

5. Create a query to display the orderNo and Ship_date for all orders shipped from warehouseNo W2.

6. Create a query to display the warehouse information from which the customer named Fatma was supplied her orders. Produce a listing: orderNo, WarehouseNo,

7. Create a query to display the 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.

8. Create a query to display the orders that were not shipped within 30 days of ordering.

9. Create a query to display the orderNo for orders that were shipped from all warehouse that the company has in Rayaan.

10.Delete all orders for customer named "Sara".

11.List all items that have a price greater than the average price.

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

1. Create the following tables: 2. Fill the table by following data: Customer Field name Data type size Note chame custo Number 3 | Customer custNo 11 22 33 chame Varchar2 25 Unique City Doha Doha Khor Shimal Khor city Varchar2 Sara Fatma Omar Ali Hassan 12 44 Item 55 Field name Data type size Note Item No 3 | Number Number Unit Price 6,2 Orders Order No 21 Odate 03-04-02 09-03-04 23-01-01 11-08-OB 06-10-10 CustNo Ord_art 11 10000 22 11000 33 14000 22 23 24 25 44 16000 20000 1 CMP5351.Sing 351 - HW 55 Orders Item ItemNo UnitPrice 1 1100 2 1200 3 1300 4 1400 5 1500 Field name Datatype size Note Order No Number 3 | Odate date NN CustNo 3 FK-Customer Number Number Ord amt 5 order Item Order No 21 25 22 24 23 Item No 1 5 2 4 3 Qty 20 30 40 10 60 Order_item Field name Data type size Note Number 3 PK Order No Item No Number 3 FK-Item 3 CMP5351-Sping 351 - HW Qty Number 5 Shipment Field name Data type size Note Order No Number 3 | WarehouseNo Varchar2 3 FK-Warehouse Date Ship_date Warehouse WS Field name Data type size Note shipment Order No WarehouseNo Ship_date 21 wi 11-Jan-02 25 W2 24-Feb-10 22 W3 13-Jun-05 24 W4 16-Sep 09 23 28-Apr-03 Warehouse WarehouseNo City Wi Najma W2 Khor W3 Doha W4 Muntza W5 Rayaan WarehouseNo Varchar2 3 PK City Varchar2 12

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

Relational Database Design A Practical Approach

Authors: Marilyn Campbell

1st Edition

1587193175, 978-1587193170

More Books

Students also viewed these Databases questions

Question

1. Administrative services, such as wages.

Answered: 1 week ago