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)
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)
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
100%
The course I'm taking is
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)](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F1825a1e7-7298-4f12-824d-239410fc4a99%2F2c2492e2-1739-469f-9013-973575a0beb4%2Fvykpoz4_processed.png&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 1 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education