You must have completed Exercise 10 in Chapter 10 for beginning this exercise and thus have used

Question:

You must have completed Exercise 10 in Chapter 10 for beginning this exercise and thus have used the SQL Data Definition Language to create tables for the three relations DRIVER, TICKET_TYPE, and TICKET?
a. Use the SQL INSERT statement to populate these tables with the following data.
You must have completed Exercise 10 in Chapter 10 for

Ttp offense Ttp fine
Parking..................15
Red Light...............50
Speeding.................65
Failure To Stop.........30

You must have completed Exercise 10 in Chapter 10 for

When entering the date of the ticket, in the INSERT statement, enclose the entire date in single quotes.
Once the three tables have been populated, write SQL Select statements to satisfy the following information requests:
a. Display the names of all drivers.
b. Display the license numbers of all drivers who have been issued a ticket.
c. Display the names of all drivers who have been issued a ticket.
d. Display the license numbers of all drivers who have never been issued a ticket.
e. Display the names of all drivers who have never been issued a ticket.
f. Count the number of tickets issued for each offense. Include as part of what you display any offense for which a ticket has not been issued.
g. For each ticket issued, display the name of the driver, the ticket number, and the nature of the offense. Order the results in ascending order by the name of the driver and within each driver order the results by ticket number.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Data Modeling and Database Design

ISBN: 978-1285085258

2nd edition

Authors: Narayan S. Umanath, Richard W. Scammel

Question Posted: