Question: 1) Find the average damage amount per car from all accidents in which the cars owned by Rubens Barrichello were not involved 2) Find the

1) Find the average damage amount per car from all accidents in which the cars owned by Rubens Barrichello were not involved

2) Find the total damage amount from all accidents in which the cars manufactured by BMW were involved. Notes: the answer should include the damage produced to other cars involved in the same accidents with the BMW cars; the amount must be reported for all accidents together, not per accident.

3) Write the same query as above, but use a scalar subquery for counting the Hondas and Toyotas a person owns, without outer join. Note: the scalar subquery may still use joins.1) Find the average damage amount per car from all accidents in

person (driver id, name, adress) car (license, model, year) accident (rabortw accident date, location) participated (pot r, license, driver jid damage amb Consider the instance of this relational database shown in Tables 1- 5 below. Use your Oracle account to create this database and populate the tables; a script is provided on Canvas for this purpose (file hn4_db.sa) Person Tabhle 2: Car Name Year Model Honda Toyota Universi Rubens Barrichelo 1st Ave Scbastian Vettel Mark Webber Lewis Hamilton Felipe Massa SZM813 SZM814 SZM815 SZM816 SZM817 SZM818 SZM819 SZM820 2009 1st Ave 1st Ave 1st Ave Univ 2008 2008 2008 2008 Honda BMW Toyota Table 3: Owns Tahle 4: Accident SZM813 SZM814 SZM815 SZM816 SZM817 SZM818 SZM819 SZM820 R01 RO2 R03 04-13-2008 07-22-2008 07-22-2008 07-22-2008 07-27-2008 01-27-2009 Highland Heights 02-15-2009 Indiana New Yorlk New Yorlk R05 R06 ROT Tabe 5: Participated R01 R02 R03 RO4 R05 R06 ROT RO4 R05 R06 ROT ROT ROT SZM813 0 SZM814 1 SZM815 4 SZM814 1 SZM817 4 SZM818 5 SZM819 0 SZM817 4 SZM813 0 SZM814 3 SZM814 1 SZM820 4 SZM813 3 6000 1000 Important: in the table Participated, the Driver id column records the id of the person who drove the car involved in an acciden from or the same as the person owning the car 5000 3000 t - this person could be different 1000

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!