Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Need answers for this BUSIT 103 SQL assignment. I have attached the file.

Need answers for this BUSIT 103 SQL assignment. I have attached the file.

--------------------------------------------------------------------------------------------------------------------

--

-- BUSIT 103      Assignment  #8       DUE DATE : Consult course calendar

--

--------------------------------------------------------------------------------------------------------------------

--

-- You are to develop SQL statements for each task listed. You should type SQL statements under each task.  

-- Please record your answers in the YOUR ANSWER field.

-- Submit your .sql file named with your last name, first name and assignment # 

-- Submit your file to the instructor using through the course site.  

--

-- GUIDELINES:

-- 1. Even though a question might not ask for it, add meaningful sorts and column names.

-- 2. Unless specified that it is okay, don't hardcode values - use subqueries instead.

--  Here's an example of hardcoding:

--  List all product that have a list price less than the average list price of all products.

--  You could run this a query to find out that the averate list price is 747.6617

/*

   SELECT AVG(ListPrice) AS ListPrice

   FROM DimProduct;

*/

--  If you then plug 747.6617 into your next query, you have hardcoded. If you add more products, 

--  you will have to change your query.

/*

   SELECT *

   FROM DimProduct

   WHERE ListPrice < 747.6617;

*/

--  Instead, you should use a subquery:

/*

SELECT *

FROM DimProduct

WHERE ListPrice < 

(SELECT AVG(ListPrice)

FROM DimProduct);

*/

--------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------

--

--REFRESHER and WARM-UP

--

--------------------------------------------------------------------------------------------------------------------

USE AdventureWorksDW2014;

--------------------------------------------------------------------------------------------------------------------

-- 1a . Explore the Product table. 

--   1 point

--

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question