You must have completed Exercise 10 in Chapter 10 for beginning this exercise and thus have used
Question:
a. Use the SQL INSERT statement to populate these tables with the following data.
Ttp offense Ttp fine
Parking..................15
Red Light...............50
Speeding.................65
Failure To Stop.........30
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.
Step by Step Answer:
Data Modeling and Database Design
ISBN: 978-1285085258
2nd edition
Authors: Narayan S. Umanath, Richard W. Scammel