Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use Adventure works database and submit Azure workbook with queries and results Create a notebook with queries to answer the following questions: Write a query

Use Adventure works database and submit Azure workbook with queries and results

Create a notebook with queries to answer the following questions:

Write a query that generates a list of all products (id and name) purchased by Frugal Bike Shop, along with the total amount sold for each product.

  1. Use Sales.store table to find Store ID for the Frugal Bike Shop
  2. Join Sales.Customer to Sales.Store on s.BusinessEntityID = c.StoreID
  3. join Sales.SalesOrderHeader using CustomerID
  4. Join Sales.SalesOrderDetail using SalesOrderID
  5. From Sales.SalesOrderDetail you can extract ProductID, UnitPrice, OrderQty. To find total you have to multiply.
  6. Join Production, Product table to get product name
  7. Now you have all the data and can aggregate line-item total by ProductID and ProductName.
  8. Finally, you need to add Order by clause.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Development Finance Innovations For Sustainable Growth

Authors: Nicholas Biekpe, Danny Cassimon, Andrew William Mullineux

1st Edition

331954165X, 978-3319541655

More Books

Students also viewed these Finance questions

Question

5. Explain how to conduct an appraisal feedback interview.

Answered: 1 week ago

Question

2. Answer the question, Who should do the appraising?

Answered: 1 week ago