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
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 |
Step by Step Solution
3.40 Rating (144 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
636ad455b7d92_243319.pdf
180 KBs PDF File
636ad455b7d92_243319.docx
120 KBs Word File
