Write Sql commands for following customer and order table: (DBMS): Write a query to display name of
Fantastic news! We've Found the answer you've been seeking!
Question:
Write Sql commands for following customer and order table:
(DBMS):
- Write a query to display name of items having maximum price.
- Write a query to calculate total no of orders placed by Ali and Junaid.
- Write a query to list name of all customers who either have placed order or not.
- Write a query to calculate average quantity of items by item wise.
Cust_ID | Name | City | ||
1 | Ali | Karachi | ||
2 | Waqar | Lahore | ||
3 | Junaid | Hyd | ||
4 | Irfan | ISB | ||
5 | Zain | Multan | ||
Order_ID | Item | Price | Quantity | Cust_ID |
1 | pizza | 1500 | 2 | 1 |
2 | burger | 800 | 1 | 1 |
3 | pizza | 450 | 3 | 3 |
4 | Fries | 250 | 2 | 3 |
5 | soda | 100 | 3 | 4 |
Related Book For
Modern Database Management
ISBN: 978-0133544619
12th edition
Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi
Posted Date: