Question
--* BUSIT 103 Assignment #2 DUE DATE: Consult course calendar /***** You are to develop SQL statements for each task listed. You should type your
--* BUSIT 103 Assignment #2 DUE DATE: Consult course calendar /***** You are to develop SQL statements for each task listed. You should type your SQL statements under each task. The fields' names are written as if a person is asking you for the report. You will need to look at the data and understand that list price is in the ListPrice field, for example. Add comments to describe your reasoning when you are in doubt about something. To find the tables that contain the fields that are requested, consider creating a Database Diagram that includes only the tables from the SalesLT schema and referring to it. *****/
/***** Do not remove the USE statement. *****/
USE AdventureWorksLT2012;
--1a. Write a SQL statement that pulls all of the records from the AdventureWorksLT SalesOrderHeader table.
--1b. Write a SQL statement that pulls all of the records from the AdventureWorksLT SalesOrderDetail table.
--1c. Study the tables in the AdventureWorksLT database and pretend you will type in data for the scenario -- below (i.e. you will *NOT* use INSERT - pretend you will hand type in the data). -- Explain how you would add records to the AdventureWorksLT database for the following scenario: -- -- An existing customer places an order for 3 distinct existing products, -- (i.e. not a quantity of 3 of one single product). -- -- Use the following format for your explanation:
-- STEP 1: Open Table X and input N records. -- STEP 2: Open Table Y and input N records. -- etc.
-- Make sure to comment out your explanation.
--2. As a member of the AdventureWorks team, you wonder ...
-- AdventureWorksLT has several hundred products. -- Is AdventureWorks getting orders for all 295? -- Or is AdventureWorksLT getting orders, again and again, for just 2-3 products? -- Are there products that have never been ordered?
-- Research and explain. -- Make sure to comment out your explanation.
-- Write a query statement that supports your explanation.
--3. List all AdventureWorks products model IDs. List each model ID only once -- and sort in order from lowest to highest. Note: You will display only the model id field.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started