Answered step by step
Verified Expert Solution
Link Copied!

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

driver,car,accident 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(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 statements, you are required to write each of the following queries in SQL.
1- List the names of all drivers who live outside 'Manama' and 'Muharaq'.
2- List the models of all cars that have odd license plate numbers.
3- List the locations of all accidents that occurred after February 23,2024.
4- List of all car models that were not involved in any accident.
5- 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions