Question
you will need to utilize the Classic Cars information located here - http://richardtwatson.com/dm6e/Reader/ClassicModels.html. Your instructor has provided a database on SQL Server called ClassicModel. You
you will need to utilize the Classic Cars information located
here - http://richardtwatson.com/dm6e/Reader/ClassicModels.html.
Your instructor has provided a database on SQL Server called ClassicModel. You will use this database to answer these questions. I only need to see the SQL you write to answer each of these queries.
Correlated Subqueries
n. Which payments in any month and year are more than twice the average for that month and year (i.e. compare all payments in Oct 2004 with theaverage payment for Oct 2004)? Order the results by the date of the payment. You will need to use the date functions(http://www.w3schools.com/sql/sql_dates.asp ).
o. Report for each product, the percentage value of its stock on hand as a percentage of the stock on hand for product line to which it belongs. Order the report by product line and percentage value within product line descending. Show percentages with two decimal places.
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