QuestionQuestion

Question 1: Write the SQL query that returns a relation (Model, Day_of_Week, Average_Age) that describes the average age of vehicles involved in accidents for each model and day of the week for ‘Honda’ vehicles during the 20th day of the month.

Question 2: Write the SQL query that returns a relation (Model, Purpose_Category, Day_of_Week, Average_Vehicle_Age) that describes the average vehicle age for vehicles involved in accidents for each Make, Purpose Category, and Day_of_Week for vehicles other than Ford, for trips with school purpose category during the first month of the year.

Question 3: Write a SQL query that returns a relation (Day_of_Week, Local_Authority_Name, PercentOverTwenty) that describes the percentage of vehicles with over 20 years that have accidents of serious severity for each day of week and local authority name, where the percentage is calculated out of all the accidents that have accidents of serious severity for each day of week and local authority name.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

--- Query 1
select Model.Model, TimeTable.Day_Of_Week, AVG(Age_Of_Vehicle) as Average_Vehicle_Age from TimeTable, Model,
(
select Model_Key, Time_Key, Age_Of_Vehicle from VehicleFacts where
Model_Key in
( SELECT Model_Key
    FROM Model where Make = 'HONDA')
    and
    Time_Key in
    ( select Time_Key
    from TimeTable where Day = 20)    
    ) s1
    where s1.Model_Key...

By purchasing this solution you'll be able to access the following files:
work.sql and Solution.accdb.

$24.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Database Development Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats