problem i need a solution for: What is the average unit price?

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter6: Additional Database Objects
Section: Chapter Questions
Problem 10MC
icon
Related questions
Question
100%

Please view both attachments before answering. The attachment is the table and its contents. I am unsure on how i can go about attempting the question. i need a SQL query to fetch average.  I am using mysql terminal. Please explain in detail so i can fully understand .  Thank you so much in advance!

 

problem i need a solution for: What is the average unit price?

mysql> desc order_db;
+-
| Field
| Туре
+-
| orderid
| custid
| itemcode
| orderquantity
deliverydate
| modeofpayment
| date_of_order
+
7 rows in set (0.01 sec)
int
I int
| int
| Null | Key | Default | Extra |
--+--- −+-
−+-
YES | UNI | NULL
| YES | MUL | NULL
| NULL
| YES
|
|
| NULL
| YES
| int
| date
| YES
| char(1) | YES |
| date
| YES
|
NULL
| NULL
NULL
Transcribed Image Text:mysql> desc order_db; +- | Field | Туре +- | orderid | custid | itemcode | orderquantity deliverydate | modeofpayment | date_of_order + 7 rows in set (0.01 sec) int I int | int | Null | Key | Default | Extra | --+--- −+- −+- YES | UNI | NULL | YES | MUL | NULL | NULL | YES | | | NULL | YES | int | date | YES | char(1) | YES | | date | YES | NULL | NULL NULL
mysql> desc item_db;
+-
Field
item_code
item_name
| current_stock
| unitprice
|
Туре
| int
| char(1)
| int
I int
+-
4 rows in set (0.01 sec)
| Null | Key | Default | Extra |
−−+.
I NO | PRI | NULL
| YES
|
| NULL
| YES
| YES
|
| NULL
| NULL
Transcribed Image Text:mysql> desc item_db; +- Field item_code item_name | current_stock | unitprice | Туре | int | char(1) | int I int +- 4 rows in set (0.01 sec) | Null | Key | Default | Extra | −−+. I NO | PRI | NULL | YES | | NULL | YES | YES | | NULL | NULL
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Payback period
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning