PROCEDURE 1: Define the VIEW named ProductInfo that returns three columns: Product ID, Order Quantity, and Average Unit Price for each product type where the product sold more than 20 units for 2014. Then, write a SELECT statement that returns all of the columns in the view, sorted by Average Price in descending order. [You should write SQL query, do not use SQL design tool]
PROCEDURE 2: Write a script that declares and a variable that is equal the total sales price. If total sales price is greater than 100.000.000, it should select records from SalesOrderDetail table. If the total sales price is less than 100.000.000, it should select records from the SalesOrderHeader table