View the step-by-step solution to:

USE AdventureWorks2014; --5. List products ordered by customer id 29898. Show product name, product number, order quantity, -- and sales order id....

USE AdventureWorks2014;

--5.a. List products ordered by customer id 29898. Show product name, product number, order quantity, 

-- and sales order id. Sort on product name and sales order id. If you add customer id to check your results, 

-- be sure to remove or comment it out. Hint: First make a database diagram with the following tables: 

-- Production.Product

-- Sales.SalesOrderHeader

-- Sales.SalesOrderDetail

--5.b. List the orders and the shipping method for customer id 29898. Show product name, product number, 

-- order quantity, sales order id, and the name of the shipping method. Sort on product name and sales 

-- order id. Hint: You will need to join an additional table. Add it to your database diagram first. 

--6. List all sales for components that were ordered during 2012. Show sales order id, product ID, 

-- product name, order quantity, and line total for each line item sale. Make certain you are retrieving 

-- only components. There are multiple ways to find components items. Sort the list by sales order id in ascending order. 

--   Hints: make a database diagram before beginning the statement. Consider using the YEAR(date) function.

--7. What is business question for AdventureWorks that you will try to answer with a SQL query. 

-- Then try to develop the SQL to answer the question using at least one INNER JOIN. 

-- Just show your question and as much SQL as you were able to figure out. 

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.


Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question