Have a Question ?

Home / Answered Questions / cis235 / cis235-assignments-hw11-sql-ii-q-280

(Solved): CIS235 Assignments HW11 – SQL II...


--TYPE YOUR NAME HERE. Do not delete the '--'

/*
    Query 1
    What is the total order price for each order listed in Northwind's database?
*/

  SELECT Orders.OrderID, SUM((UnitPrice*Quantity)-Discount)
  FROM OrderDetails left join OrderDetails on OrderDetails.OrderID=Orders.OrderID 
  Group by OrderID;

/*
    Query 2
    Add to the previous query. Include the Customer ID and Shipping Name for each order that is totaled in the previous query. Sort the output by Customer ID.
*/

 

/*
    Query 3
    What prouducts sold by Northwind have a unit price more than $20 but less than $50 and are currently in stock?
*/

 

/*
    Query 4
    How many of Northwind's customers are explicitly identified as "Manager" in their job title?
*/
SELECT * FROM Customers
WHERE ContactTitle LIKE '%Manager%';

/*
    Query 5
    What are the employees responsible for a sale (last name only), the ID of the order, the shipping name, shipping country, and shipping fee for orders placed to ship to customers in the UK and Ireland?
    
    Sort these results by employee last name. Also, for readability purposes format the field names as “Employee Last Name”, “Order ID”, “Freight Company”, “Destination Country”, and “Shipping Cost”, respectively
*/

 



We have an Answer from Expert View Expert Answer

Expert Answer


/*
    Query 5
    What are the employees responsible for a sale (last name only), the ID of the order, the shipping name, shipping country, and shipping fee for orders placed to ship to customers in the UK and Ireland?
    
    Sort these results by employee last name. Also, for readability purposes format the field names as “Employee Last Name”, “Order ID”, “Freight Company”, “Destination Country”, and “Shipping Cost”, respectively
*/

We have an Answer from Expert
Buy This Answer $12

-- OR --

Subscribe To View Unlimited Answers
Subscribe $12 / Month