i. Find the total number of people who owned cars that were involved in accident 2004?
select count (distinct name) from accident, participated, person where accident.reporcno = participated.report_number and participated.drivercid = person.driver_id and date between date ’2004-01-01’ and date ’2004-12-31’.
ii. Find the number of accidents in which the cars belonging to "HT" were involved
select count (distinct *) from accident where exists (select * from participated, person where participated.drivercid = person.driver_id and person.name = ’HT’ andaccident.reporcno = participated.report_number)
iii. Update the damage amount for car with license number "Mum2011" in the accident with report number "AR120" to Rs. 4000
update participated setdamage_amount = 4000 wherereport_number = “AR120” anddrivercid in (selectdriver_id from owns where license = “Mum2011”)