11. For each accident, list the registration number, year, make, and model of th
ID: 3832970 • Letter: 1
Question
11. For each accident, list the registration number, year, make, and model of the car(s) involved.
12. List all accidents that occurred during 2005.
13. List the SSN, first name, and last name of all policy holders who have not had an accident.
Note: Don't use inner or outer joins. Only Where, between, or, and, not, etc clauses for these questions.
USE THESE TABLES FOR QUESTIONS 11 THRU 17 POLICY policy registration#, FK: registration# PEOPLE ssn. fname, name, mi, address VEHICLE registration#, year, make, model ACCIDENT accidentH, registration#, ssn, date, payout FK: registration# FK: ssn COVERAGE TYPE coverage Type, description POLICY GE policy# covera deductible, max amount FK: policy FK: coverage Type PEOPLE POLICY SSn FK: ssn FK: policyExplanation / Answer
11)
select a.accident#,a.registration#,v.year,v.make,v.model from Accident a,Vehicle v where a.registration#=v.registration#;
12)
select accident#,registration# from Accident where EXTRACT(year from date)='2005'
13)
select pe.ssn,pe.fname,pe.lname from People pe where pe.ssn in(select ssn from People_Policy where policy# not in(select policy# from Policy where registration# in (select registration# from Accident)))
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.