Write the SQL statements for below: 1. Display the customer ID, customer name and customer state in
Fantastic news! We've Found the answer you've been seeking!
Question:
Write the SQL statements for below:
1.
- Display the customer ID, customer name and customer state in the table Customer_T if the customer has business in the Central or NorthEast territories;
- Sort the result set by customer ID in ascending order.
2.
- For each product finish, calculate the number of products, the average standard price and the highest standard price;
- Display the product finish and the calculated data, if the product is NOT made with White Ash and the lowest standard price is above 100
- Sort the result set by the number of products in descending order.
3.
- ·Display the territory ID, territory name, customer ID, customer name, salesperson ID and salesperson name, if the salesperson's phone number begins with 813 (note: the phone number is defined as CHAR(10).);
- Sort the result set first by territory ID in ascending order and then by customer ID in descending order.
4.
- For each product line, calculate the number of products and the largest ordered quantity
- Display the product line ID, product line name, the calculated data if any product in the product line has been ordered by a customer living in in CA, NJ, FL or TX and the total ordered quantity is over 5
- Sort the result set by the number of products in descending order
Posted Date: