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

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.

Dr license no Dr name WX 322 RVX 287 IGY 832 KEC 654 MQA 823 GRE 720 E. Mills R. Brooks L. Silva R. Lence E. Blair H. Newman Dr cit Waller Bellaire Sugarland Houston Houston Pearland Dr state TX TX TX TX TX TX Tic Ticket noTic ticket date Tic dr 1icense no Tic ttp offense 1023 1025 1397 1027 1225 1212 1024 1037 2014-12-20 2014-12-21 2014-12-03 2014-12-22 2014-12-22 2014-12-06 2014-12-21 2014-12-23 MVX 322 RVX 287 MVX 322 TGY 832 KEC 654 MWX 322 RVX 287 MVX 322 Parking Red Light Parking Parking Speeding Speeding Speeding Red Light

Step by Step Solution

3.39 Rating (171 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

ALTER SESSION SET NLSDATEFORMAT yyyymmdd Set echo on Set feedback on Drop table driver cascade constraints Drop table tickettype cascade constraints D... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

887-CS-DB (2235).docx

120 KBs Word File

Students Have Also Explored These Related Databases Questions!