mysql> select from customer_db; +- | cust_id❘ cust_name | cust_hname | cust_street | cust_phone | 1 pallasigue | 5252abc 2 | riya 3 adan 6196 | 443567 | 6199 98765 | | curryst 8 | sean | 123abc 57abc | 12345abc | 123abc | diablo curryst tommy | diablo 443567 | 9 riya -+- 5 rows in set (0.00 sec) mysql> select * from order_db; +- | orderid | custid | itemcode | orderquantity | deliverydate | modeofpayment | date_of_order | | 2020-05-28 | 1998-02-15 2024-09-03 250 | 2 2 800 | 2020-05-30 | C 200 | 2 | 2 | 600 | 2021-09-21 R 500 | 2 | 2 | 125 2023-06-02 D 300 | 2 2 200 | 2020-05-29 I c | 1998-02-15 75 | 21 2 265 | 2020-05-29 | C | 1998-02-15 5 rows in set (0.00 sec)

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

The course I'm taking is database management. 

I have attached the necessary information for question. Please provide solution in detail so i can better understand why. I need solution query for part A and B utilizing SUBQUERY. Thank you in Advance!

 

Part A -  Display the order details of all orders where order quantity exceeds the average of order
quantity.

Part B - Display all orders whose order quantity is greater than the maximum order quantity of
'curryst' customers.

mysql> select from customer_db;
+-
| cust_id❘ cust_name | cust_hname | cust_street | cust_phone |
1 pallasigue | 5252abc
2 | riya
3 adan
6196 |
443567 |
6199
98765 |
| curryst
8 | sean
| 123abc
57abc
| 12345abc
| 123abc
| diablo
curryst
tommy
| diablo
443567 |
9 riya
-+-
5 rows in set (0.00 sec)
mysql> select * from order_db;
+-
| orderid | custid | itemcode | orderquantity | deliverydate | modeofpayment | date_of_order |
| 2020-05-28
| 1998-02-15
2024-09-03
250 |
2
2
800 | 2020-05-30 | C
200 |
2 |
2 |
600 | 2021-09-21
R
500 |
2 |
2 |
125 2023-06-02
D
300 |
2
2
200 | 2020-05-29
I c
| 1998-02-15
75 |
21
2
265 | 2020-05-29
| C
| 1998-02-15
5 rows in set (0.00 sec)
Transcribed Image Text:mysql> select from customer_db; +- | cust_id❘ cust_name | cust_hname | cust_street | cust_phone | 1 pallasigue | 5252abc 2 | riya 3 adan 6196 | 443567 | 6199 98765 | | curryst 8 | sean | 123abc 57abc | 12345abc | 123abc | diablo curryst tommy | diablo 443567 | 9 riya -+- 5 rows in set (0.00 sec) mysql> select * from order_db; +- | orderid | custid | itemcode | orderquantity | deliverydate | modeofpayment | date_of_order | | 2020-05-28 | 1998-02-15 2024-09-03 250 | 2 2 800 | 2020-05-30 | C 200 | 2 | 2 | 600 | 2021-09-21 R 500 | 2 | 2 | 125 2023-06-02 D 300 | 2 2 200 | 2020-05-29 I c | 1998-02-15 75 | 21 2 265 | 2020-05-29 | C | 1998-02-15 5 rows in set (0.00 sec)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 1 steps

Blurred answer
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
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage