Answer the given question with a proper explanation and step-by-step solution. Using SQL Server and the AdventureWorks2012 Database to create Multi table queries. A) Write a query to find out how many products had a scrapped quantity greater than 20 and an order quantity greater than 2000. List the Product ID, Product Name, Product Number, Work Order ID, Order Quantity, Scrapped Quantity, and Scrap Reason ID. Sort by Scrapped Quantity, and then by Product ID. Use the Production.Product and the Production.Workorder tables. B) Write a query to find out how many Vista credit cards expire in 2008 or more recent (2009, 2010, etc.) from customer 11151, 11223, and 11750. List the Credit Card ID, Card Type, Card Number, Expiration Month, Expiration Year, Sales Order ID, and Customer ID. Order by Customer ID. Use the Sales.Creditcard and Sales.SalesOrderHeader tables
Answer the given question with a proper explanation and step-by-step solution.
Using SQL Server and the AdventureWorks2012
A) Write a query to find out how many products had a scrapped quantity greater than 20 and an order quantity greater than 2000. List the Product ID, Product Name, Product Number, Work Order ID, Order Quantity, Scrapped Quantity, and Scrap Reason ID. Sort by Scrapped Quantity, and then by Product ID. Use the Production.Product and the Production.Workorder tables.
B) Write a query to find out how many Vista credit cards expire in 2008 or more recent (2009, 2010, etc.) from customer 11151, 11223, and 11750. List the Credit Card ID, Card Type, Card Number, Expiration Month, Expiration Year, Sales Order ID, and Customer ID. Order by Customer ID. Use the Sales.Creditcard and Sales.SalesOrderHeader tables

Step by step
Solved in 3 steps









