1) List all products with their highest unit price, i.e. not discounted. 2) List the average unit price for each product category and the average unit price without discounts

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

1) List all products with their highest unit price, i.e. not discounted.
2) List the average unit price for each product category and
the average unit price without discounts

COMP214F21_009_P_16.ORDERDETAILS
COMP214F21_009_P_16.PRODUCTS
COMP214F21_009_P_16.CATEGORIES
PF ORDERID
PF" PRODUCTID
* UNITPRICE
NUMBER
IP
PRODUCTID
NUMBER
P CATEGORYID
NUMBER
* PRODUCTNAME
* CATEGORYNAME
VARCHAR2 (15 BYTE)
VARCHAR2 (300 BYTE)
NUMBER
VARCHAR2 (40 BYTE)
NUMBER
SUPPLIERID
NUMBER
DESCRIPTION
QUANTITY
NUMBER
CATEGORYID
NUMBER
PICTURE
LONG RAW
* DISCOUNT
NUMBER
QUANTITYPERUNIT
VARCHAR2 (20 BYTE)
- PK_CATEGORIES (CATEGORYID)
UNITPRICE
NUMBER
- PK_ORDER_DETAILS (ORDERID, PRODUCTID)
COMP214F21_009_P_16.SHIPPERS
UNITSINSTOCK
NUMBER
O PK_CATEGORIES (CATEGORYID)
FK_ORDERDETAILS_ORDERS (ORDERID)
FK_ORDERDETAILS_PRODUCTS (PRODUCTID)
P SHIPPERID
NUMBER
UNITSONORDER
NUMBER
COMPΑΝΥΝΑMΕ
REORDERLEVEL
NUMBER
VARCHAR2 (40 BYTE)
VARCHAR2 (24 BYTE)
PHONE
O PK_ORDER_DETAILS (ORDERID, PRODUCTID)
DISCONTINUED
NUMBER (1)
- PK_SHIPPERS (SHIPPERID)
- PK_PRODUCTS (PRODUCTID)
O PK_SHIPPERS (SHIPPERID)
FK_PRODUCTS_CATEGORIES (CATEGORYID)
FK_PRODUCTS_SUPPLIERS (SUPPLIERID)
COMP214F21_009_P_16.ORDERS
COMP214F21_009_P_16.SUPPLIERS
O PK_PRODUCTS (PRODUCTID)
P SUPPLIERID
* COMPANYNAME
P ORDERID
NUMBER
NUMBER
VARCHAR2 (40 BYTE)
VARCHAR2 (30 BYTE)
VARCHAR2 (30 BYTE)
VARCHAR2 (60 BYTE)
VARCHAR2 (15 BYTE)
VARCHAR2 (15 BYTE)
VARCHAR2 (10 BYTE)
VARCHAR2 (15 BYTE)
VARCHAR2 (24 BYTE)
VARCHAR2 (24 BYTE)
VARCHAR2 (200 BYTE)
CUSTOMERID
CHAR (5 BYTE)
COMP214 F21_009_P_16.EMPLOYEES
F
EMPLOYEEID
NUMBER
CONTACTNAME
TERRITORYID
VARCHAR2 (20 BYTE)
CONTACTTITLE
P ΕMPLOYE D
* LASTNAME
* FIRSTNAME
NUMBER
ORDERDATE
DATE
DATE
ADDRESS
VARCHAR2 (20 BYTE)
VARCHAR2 (10 BYTE)
VARCHAR2 (30 BYTE)
VARCHAR2 (25 BYTE)
REQUIREDDATE
CITY
SHIPPEDDATE
DATE
COMP214F21_009_P_16.CUSTOMERS
REGION
TITLE
SHIPVIA
NUMBER
POSTALCODE
P CUSTOMERID
* COMPANYNAME
CHAR (5 BYTE)
VARCHAR2 (40 BYTE)
VARCHAR2 (30 BYTE)
VARCHAR2 (30 BYTE)
VARCHAR2 (60 BYTE)
VARCHAR2 (15 BYTE)
VARCHAR2 (15 BYTE)
TITLEOFCOURTESY
FREIGHT
NUMBER
COUNTRY
BIRTHDATE
DATE
SHIPNAME
PHONE
VARCHAR2 (40 BYTE)
VARCHAR2 (60 BYTE)
VARCHAR2 (15 BYTE)
VARCHAR2 (15 BYTE)
HIREDATE
DATE
CONTACTNAME
SHIPADDRESS
FAX
VARCHAR2 (60 BYTE)
VARCHAR2 (15 BYTE)
VARCHAR2 (15 BYTE)
VARCHAR2 (10 BYTE)
VARCHAR2 (15 BYTE)
VARCHAR2 (24 BYTE)
VARCHAR2 (4 BYTE)
ADDRESS
CONTACTTITLE
SHIPCITY
НОМЕРАGE
CITY
ADDRESS
SHIPREGION
CITY
REGION
- PK_SUPPLIERS (SUPPLIERID)
REGION
SHIPPOSTALCODE
VARCHAR2 (10 BYTE)
VARCHAR2 (15 BYTE)
POSTALCODE
SHIPCOUNTRY
O PK_SUPPLIERS (SUPPLIERID)
COUNTRY
POSTALCODE
VARCHAR2 (10o BYTE)
VARCHAR2 (15 BYTE)
VARCHAR2 (24 BYTE)
HOMEPHONE
- PK_ORDERS (ORDERID)
COUNTRY
EXTENSION
PHONE
E FK_ORDERS_CUSTOMERS (CUSTOMERID)
FK_ORDERS_EMPLOYEES (EMPLOYEEID)
FK_ORDERS_SHIPPERS (SHIPVIA)
FK_ORDERS_TERRITORIES (TERRITORYID)
РHOTO
LONG RAW
FAX
VARCHAR2 (24 BYTE)
NOTES
VARCHAR2 (600 BYTE)
- PK_CUSTOMERS (CUSTOMERID)
F
REPORTSTO
NUMBER
РHOTOPATH
VARCHAR2 (255 BYTE)
O PK_CUSTOMERS (CUSTOMERID)
O PK_ORDERS (ORDERID)
- PK_EMPLOYEES (EMPLOYEEID)
FK_EMPLOYEES_EMPLOYEES (REPORTSTO)
O PK_EMPLOYEES (EMPLOYEEID)
COMP214F21_009_P_16.CUSTOMERCUSTOMERDEMO
PF CUSTOMERID
PF CUSTOMERTYPEID
CHAR (5 BYTE)
CHAR (10 BYTE)
COMP214F21_009_P_16.TERRITORIES
P. TERRITORYID
* TERRITORYDESCRIPTION
F REGIONID
VARCHAR2 (20 BYTE)
- PK_CUSTOMERDEMO (CUSTOMERID, CUSTOMERTYPEID)
B FK_CUSTOMERDEMO (CUSTOMERTYPEID)
FK CUSTOMERDEMO_CUSTOMERS (CUSTOMERID)
O PK_CUSTOMERDEMO (CUSTOMERID, CUSTOMERTYPEID)
CHAR (50 BYTE)
NUMBER
COMP214F21_009_P_16.EMPLOYEETERRITORIES
- PK_TERRITORIES (TERRITORYID)
PF" EMPLOYEEID
PF TERRITORYID
NUMBER
VARCHAR2 (20 BYTE)
FK TERRITORIES_REGION (REGIONID)
O PK_TERRITORIES (TERRITORYID)
- PK_EMPTERRITORIES (EMPLOYEEID, TERRITORYID)
* FK_EMPTERRI_EMPLOYEES (EMPLOYEEID)
FK_EMPTERRI_TERRITORIES (TERRITORYID)
COMP214F21_009_P_16.CUSTOMERDEMOGRAPHICS
O PK_EMPTERRITORIES (EMPLOYEEID, TERRITORYID)
P CUSTOMERTYPEID
CHAR (10 BYTE)
COMP214F21_009_P_16.REGION
CUSTOMERDESC
LONG
P REGIONID
NUMBER
- PK_CUSTOMERDEMOGRAPHICS (CUSTOMERTYPEID)
* REGIONDESCRIPTION
CHAR (50 BYTE)
O PK_CUSTOMERDEMOGRAPHICS (CUSTOMERTYPEID)
PK_REGION (REGIONID)
O PK_REGION (REGIONID)
Transcribed Image Text:COMP214F21_009_P_16.ORDERDETAILS COMP214F21_009_P_16.PRODUCTS COMP214F21_009_P_16.CATEGORIES PF ORDERID PF" PRODUCTID * UNITPRICE NUMBER IP PRODUCTID NUMBER P CATEGORYID NUMBER * PRODUCTNAME * CATEGORYNAME VARCHAR2 (15 BYTE) VARCHAR2 (300 BYTE) NUMBER VARCHAR2 (40 BYTE) NUMBER SUPPLIERID NUMBER DESCRIPTION QUANTITY NUMBER CATEGORYID NUMBER PICTURE LONG RAW * DISCOUNT NUMBER QUANTITYPERUNIT VARCHAR2 (20 BYTE) - PK_CATEGORIES (CATEGORYID) UNITPRICE NUMBER - PK_ORDER_DETAILS (ORDERID, PRODUCTID) COMP214F21_009_P_16.SHIPPERS UNITSINSTOCK NUMBER O PK_CATEGORIES (CATEGORYID) FK_ORDERDETAILS_ORDERS (ORDERID) FK_ORDERDETAILS_PRODUCTS (PRODUCTID) P SHIPPERID NUMBER UNITSONORDER NUMBER COMPΑΝΥΝΑMΕ REORDERLEVEL NUMBER VARCHAR2 (40 BYTE) VARCHAR2 (24 BYTE) PHONE O PK_ORDER_DETAILS (ORDERID, PRODUCTID) DISCONTINUED NUMBER (1) - PK_SHIPPERS (SHIPPERID) - PK_PRODUCTS (PRODUCTID) O PK_SHIPPERS (SHIPPERID) FK_PRODUCTS_CATEGORIES (CATEGORYID) FK_PRODUCTS_SUPPLIERS (SUPPLIERID) COMP214F21_009_P_16.ORDERS COMP214F21_009_P_16.SUPPLIERS O PK_PRODUCTS (PRODUCTID) P SUPPLIERID * COMPANYNAME P ORDERID NUMBER NUMBER VARCHAR2 (40 BYTE) VARCHAR2 (30 BYTE) VARCHAR2 (30 BYTE) VARCHAR2 (60 BYTE) VARCHAR2 (15 BYTE) VARCHAR2 (15 BYTE) VARCHAR2 (10 BYTE) VARCHAR2 (15 BYTE) VARCHAR2 (24 BYTE) VARCHAR2 (24 BYTE) VARCHAR2 (200 BYTE) CUSTOMERID CHAR (5 BYTE) COMP214 F21_009_P_16.EMPLOYEES F EMPLOYEEID NUMBER CONTACTNAME TERRITORYID VARCHAR2 (20 BYTE) CONTACTTITLE P ΕMPLOYE D * LASTNAME * FIRSTNAME NUMBER ORDERDATE DATE DATE ADDRESS VARCHAR2 (20 BYTE) VARCHAR2 (10 BYTE) VARCHAR2 (30 BYTE) VARCHAR2 (25 BYTE) REQUIREDDATE CITY SHIPPEDDATE DATE COMP214F21_009_P_16.CUSTOMERS REGION TITLE SHIPVIA NUMBER POSTALCODE P CUSTOMERID * COMPANYNAME CHAR (5 BYTE) VARCHAR2 (40 BYTE) VARCHAR2 (30 BYTE) VARCHAR2 (30 BYTE) VARCHAR2 (60 BYTE) VARCHAR2 (15 BYTE) VARCHAR2 (15 BYTE) TITLEOFCOURTESY FREIGHT NUMBER COUNTRY BIRTHDATE DATE SHIPNAME PHONE VARCHAR2 (40 BYTE) VARCHAR2 (60 BYTE) VARCHAR2 (15 BYTE) VARCHAR2 (15 BYTE) HIREDATE DATE CONTACTNAME SHIPADDRESS FAX VARCHAR2 (60 BYTE) VARCHAR2 (15 BYTE) VARCHAR2 (15 BYTE) VARCHAR2 (10 BYTE) VARCHAR2 (15 BYTE) VARCHAR2 (24 BYTE) VARCHAR2 (4 BYTE) ADDRESS CONTACTTITLE SHIPCITY НОМЕРАGE CITY ADDRESS SHIPREGION CITY REGION - PK_SUPPLIERS (SUPPLIERID) REGION SHIPPOSTALCODE VARCHAR2 (10 BYTE) VARCHAR2 (15 BYTE) POSTALCODE SHIPCOUNTRY O PK_SUPPLIERS (SUPPLIERID) COUNTRY POSTALCODE VARCHAR2 (10o BYTE) VARCHAR2 (15 BYTE) VARCHAR2 (24 BYTE) HOMEPHONE - PK_ORDERS (ORDERID) COUNTRY EXTENSION PHONE E FK_ORDERS_CUSTOMERS (CUSTOMERID) FK_ORDERS_EMPLOYEES (EMPLOYEEID) FK_ORDERS_SHIPPERS (SHIPVIA) FK_ORDERS_TERRITORIES (TERRITORYID) РHOTO LONG RAW FAX VARCHAR2 (24 BYTE) NOTES VARCHAR2 (600 BYTE) - PK_CUSTOMERS (CUSTOMERID) F REPORTSTO NUMBER РHOTOPATH VARCHAR2 (255 BYTE) O PK_CUSTOMERS (CUSTOMERID) O PK_ORDERS (ORDERID) - PK_EMPLOYEES (EMPLOYEEID) FK_EMPLOYEES_EMPLOYEES (REPORTSTO) O PK_EMPLOYEES (EMPLOYEEID) COMP214F21_009_P_16.CUSTOMERCUSTOMERDEMO PF CUSTOMERID PF CUSTOMERTYPEID CHAR (5 BYTE) CHAR (10 BYTE) COMP214F21_009_P_16.TERRITORIES P. TERRITORYID * TERRITORYDESCRIPTION F REGIONID VARCHAR2 (20 BYTE) - PK_CUSTOMERDEMO (CUSTOMERID, CUSTOMERTYPEID) B FK_CUSTOMERDEMO (CUSTOMERTYPEID) FK CUSTOMERDEMO_CUSTOMERS (CUSTOMERID) O PK_CUSTOMERDEMO (CUSTOMERID, CUSTOMERTYPEID) CHAR (50 BYTE) NUMBER COMP214F21_009_P_16.EMPLOYEETERRITORIES - PK_TERRITORIES (TERRITORYID) PF" EMPLOYEEID PF TERRITORYID NUMBER VARCHAR2 (20 BYTE) FK TERRITORIES_REGION (REGIONID) O PK_TERRITORIES (TERRITORYID) - PK_EMPTERRITORIES (EMPLOYEEID, TERRITORYID) * FK_EMPTERRI_EMPLOYEES (EMPLOYEEID) FK_EMPTERRI_TERRITORIES (TERRITORYID) COMP214F21_009_P_16.CUSTOMERDEMOGRAPHICS O PK_EMPTERRITORIES (EMPLOYEEID, TERRITORYID) P CUSTOMERTYPEID CHAR (10 BYTE) COMP214F21_009_P_16.REGION CUSTOMERDESC LONG P REGIONID NUMBER - PK_CUSTOMERDEMOGRAPHICS (CUSTOMERTYPEID) * REGIONDESCRIPTION CHAR (50 BYTE) O PK_CUSTOMERDEMOGRAPHICS (CUSTOMERTYPEID) PK_REGION (REGIONID) O PK_REGION (REGIONID)
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY