Question: Write the correct SQL statements for the following situations: Isenberg School of Management, UMass Amherst ui For each product, calculate the number of orders and

Write the correct SQL statements for the following situations:

Write the correct SQL statements for the following situations: Isenberg School of

Isenberg School of Management, UMass Amherst ui For each product, calculate the number of orders and the total sales (standard price ordered quantity) Display product ID, product description, product line name and the calculated data if the ordered product is priced above $300 and the number of orders is greater than 2 . Sort the result set first by the number of orders in descending order and then by the total sales in descending order SELECT COUNT(Order_ID), SUM (Standard-Price"Ordered-Quantity) AS TotalSales FROM Order-Line-TAS ol, Product. TAS p WHERE AND Standard Price 300 GROUP BY HAVING ORDER BY ui . For each product finish, calculate the number of orders, the total sales, the total ordered quantity and the average ordered quantity Display the product finish, product line name and the calculated data if the average ordered quantity is greater than 2 and the total ordered quantity is greaterthan!5 Sort the result set by the product finish in alphabetical order . ui . For each customer state, calculate the total sales, the total ordered quantity and the largest ordered quantity Display the customer state and the calculated data, if the largest ordered quantity is above 3 and the product line name of an ordered product is Country Look or Scandinavia Sort the result set by the customer state in alphabetical order . Isenberg School of Management, UMass Amherst ui For each product, calculate the number of orders and the total sales (standard price ordered quantity) Display product ID, product description, product line name and the calculated data if the ordered product is priced above $300 and the number of orders is greater than 2 . Sort the result set first by the number of orders in descending order and then by the total sales in descending order SELECT COUNT(Order_ID), SUM (Standard-Price"Ordered-Quantity) AS TotalSales FROM Order-Line-TAS ol, Product. TAS p WHERE AND Standard Price 300 GROUP BY HAVING ORDER BY ui . For each product finish, calculate the number of orders, the total sales, the total ordered quantity and the average ordered quantity Display the product finish, product line name and the calculated data if the average ordered quantity is greater than 2 and the total ordered quantity is greaterthan!5 Sort the result set by the product finish in alphabetical order . ui . For each customer state, calculate the total sales, the total ordered quantity and the largest ordered quantity Display the customer state and the calculated data, if the largest ordered quantity is above 3 and the product line name of an ordered product is Country Look or Scandinavia Sort the result set by the customer state in alphabetical order

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!