Spring 2005

ITEC 340  Homework 1

 

Use the DESCRIBE and SELECT commands to examine the following tables:

 

Nascar.Drivers

Nascar.Races

Nascar.Results

Nascar.Teams

Nascar.Cars

 

Construct a separate script for each of the following.  Please use the script name indicated.  Please note that the second character in each script name is the number one not the letter L.

 

H1a.sql            The driver name and team name of all rookie drivers

ordered by team name.

 

H1b.sql            The driver name, finish place, and points earned from the Daytona 500

                        order by finish place from first to last.

 

H1c.sql            The race name, starting position, finish place, and difference between

                        starting position and finish place for all the race results of Jeff Gordon

                        ordered by finish place from best finish to worst finish.  Where there

                        are multiple races with the same finish position order within them by

                        starting position from worst starting position to best starting position.

 

H1d.sql            A non-repeating list of the venues (tracks) in the database.

 

H1e.sql            The driver name, race name, and finish place for any race result

                        where the driver started out of the top ten but finished in the top ten

                        or any race result where bonus points were awarded.

 

H1f.sql             The number of races that Jeff Gordon raced in.  (not a list… the number)

 

H1g.sql            The list of driver names and the number of total number of points they

                        earned ordered from the driver with the most points to the driver with

                        the fewest points.

 

H1h.sql            Same as h1h except only include those drivers that have more than

                        3000 points.

 

H1i.sql             The driver name, team name, and driver type of the driver that won

                        the Daytona 500.    Do not hard code your query… use a nesting.

 

H1ja.sql            The team name and number of veteran drivers for those teams with more

 than two veteran drivers ordered from the team with the most veteran

drivers to the team with the fewest veteran drivers.

 

Place your ten scripts in a folder named RU01 in your ITEC 340 submissions folder by 5:00 on Monday January 24th.