Answered step by step
Verified Expert Solution
Question
1 Approved Answer
driver , car , accident and report are the names of some tables in an insurance database system. These tables are created by executing the
drivercaraccident and report are the names of some tables in an insurance database system. These tables are created by executing the following SQL CREATE statements.
CREATE TABLE driver
driverID INT NOT NULL PRIMARY KEY,
name VARCHAR NOT NULL,
cityAddress VARCHAR
;
CREATE TABLE car
plateID INT NOT NULL PRIMARY KEY,
model VARCHAR NOT NULL,
year YEAR NOT NULL
;
CREATE TABLE accident
reportNumber INT NOT NULL PRIMARY KEY,
date Date NOT NULL,
location VARCHAR NOT NULL
;
CREATE TABLE report
reportNumber INT NOT NULL,
plateID INT NOT NULL,
driverID INT NOT NULL,
damageAmount DOUBLE
;
Based on the previous SQL statements, you are required to write each of the following queries in SQL
List the names of all drivers who live outside 'Manama' and 'Muharaq'.
List the models of all cars that have odd license plate numbers.
List the locations of all accidents that occurred after February
List of all car models that were not involved in any accident.
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