0% found this document useful (0 votes)
162 views

CIS182 Homework 4

This document provides instructions for homework assignment #4 involving writing SQL queries to analyze a transportation database. It lists 14 queries of varying point values to complete, focusing on retrieving information about trips such as departure times, routes, and locations, as well as analyzing operator hire dates and lengths of service. The goal is to gain experience using the SELECT statement to query and analyze relational database tables.

Uploaded by

rriness
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
162 views

CIS182 Homework 4

This document provides instructions for homework assignment #4 involving writing SQL queries to analyze a transportation database. It lists 14 queries of varying point values to complete, focusing on retrieving information about trips such as departure times, routes, and locations, as well as analyzing operator hire dates and lengths of service. The goal is to gain experience using the SELECT statement to query and analyze relational database tables.

Uploaded by

rriness
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Name:___________________________

CIS-182
Homework #4 – Using Select
Complete the following queries. Turn in this sheet with your SQL code and screen prints.

1. The following queries are worth one point each.


a. Display all 2005 trips departing from the Olympia Transit Center sorted by departure
time.
b. Display all trips for route 15 sorted by effective date, starting location and start time.
c. Display all September 2004 trips which start before 8:00 sorted by starting location,
start time, and route number.
d. Display the full name (as one field) and hire date of all operators hired during 2002.

2. The flowing queries are worth two points each.


a. Display the elapsed trip time for all trips.
b. Display route number, start location – end location (one field), and start time for trips
departing between 8:00am and 4:00pm in January 2005.
c. Calculate the length of service in years for all operators (difference between hire date
and the current date).

3. The following queries are worth three points each.


a. How many 2005 trips start or end in Yelm?
b. Display the total number of operators hired each year.
c. Display the number of operators hired in each year where more than one operator was
hired.
d. How many operators have worked for more than eight years?
e. What is the total elapsed time for all September 2004 trips serving Westfield Shopping
Mall?

3/26/10

You might also like