Question
'driver', 'car', 'accident' and 'report' are names of some tables in the insurance database system. These tables were created by executing the following SQL creation
'driver', 'car', 'accident' and 'report' are names of some tables in the insurance database system. These tables were created by executing the following SQL creation statements.
CREATE TABLE driver( driverID INT NOT NULL PRIMARY KEY, name VARCHAR(30) NOT NULL, cityAddress VARCHAR(25) );
CREATE TABLE car( plateID INT NOT NULL PRIMARY KEY, model VARCHAR(20) NOT NULL, year YEAR(4) NOT NULL );
CREATE TABLE accident( reportNumber INT NOT NULL PRIMARY KEY, date Date NOT NULL, location VARCHAR(20) NOT NULL );
CREATE TABLE report ( reportNumber INT NOT NULL, plateID INT NOT NULL, driverID INT NOT NULL, damageAmount DOUBLE );
Based on the previous SQL creation statements, you are required to write each of the following queries in SQL.
1- List the models of all cars which were not involved in any accident.
2- List the names and addresses of all drivers who were not involved in any accident.
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