|
Fall Semester 2002 |
This is the A114/I111 Midterm Exam for the Fall 2002 semester. The exam is open book, and open notes.
You have 50 minutes to complete it. Turn in the answers on the extra paper provided and keep the actual
exam, as there's a second part to it: tomorrow in lab you should turn in the answers to these questions
after having checked your answers in Access. Should you find any mistakes in what you turned in today,
you can improve your grade by turning in a corrected version tomorrow, with any explanations of what
you missed during the written test, and why. Best of luck and do very well!
Technicians and the other one for the Marinas.
First, here's the table of marinas (names are made up)
| Marina Number | Marina Name | Tech Number |
|---|---|---|
| Pac | Indiana Pacers | 1 |
| Lak | Los Angeles Lakers | 2 |
| Bul | Chicago Bulbs | 1 |
| Phi | Philadelphia 76ers | 1 |
And here are the technicians:
| Tech Number | Tech Name |
|---|---|
| 1 | Larry Bird |
| 2 | Phil Jackson |
(Please refer to this database for this and the next few questions).
What's the result of running the following query against this database:
SELECT [Marina Name] FROM Marina
SELECT [Marina Name] FROM Marina, Technician
SELECT [Marina Name] FROM Marina, Technician WHERE Technician.[Tech Number] = Marina.[Tech Number]
SELECT [Marina Name] FROM Marina, Technician WHERE Technician.[Tech Number] = Marina.[Tech Number] AND [Tech Name] = 'Larry Bird'
Larry Bird.
SELECT [Marina Name] FROM Marina, Technician WHERE [Tech Name] = 'Larry Bird'
Grades):
| Name | Date | Grade |
|---|---|---|
| Larry | 10/1/2003 | 10 |
| Michael | 10/3/2003 | 8 |
| Larry | 10/5/2003 | 6 |
| Larry | 10/7/2003 | 7 |
| Michael | 10/7/2003 | 10 |
| Michael | 10/10/2003 | 8 |
Write an SQL query that lists the players and their average grades.
(The answer is: Larry 7.66, Michael 8.66).
Grades table?