EEN523 First Assignment
Due Thursday 4th February 1999
Using the example database, called class, (connect
with sql -p class)
design SQL queries that answer the following six questions. In all cases make the queries
produce output that is readable by humans. That means don't be satisfied with mysterious
codes, print meaningful information instead. All questions should be answered with a single query,
not a sequence.
(1) Find the address and other personal details of the person
named Snibby Folstort.
(2) Find the number of people who live in the same state as him or her.
(3) List all the places that he or she travelled to in January 1999.
(4) List the names and addresses of all people who were (or will be) on an aerolplane
with him or her, on the 24th February 1999 and paid less for their ticket.
(5) List the names and addresses of all people who have ever travelled
between Yellow-Knife and Moscow.
(6) For all flights that have occurred (or will occur) between Yellow-Knife and
Moscow, list the flight number, date, and minimum fare paid by any passenger on the flight.
For each question, submit the query and
the output it produces. Electronic submissions only please.