Alexamara Marina Group
Use SQL and the Alexamara Marina Group database (see Figures 1-8 through 1-12 in Chapter 1) to complete the following exercises. If directed to do so by your instructor, use the information pro- vided with the Chapter 3 Exercises to print your output.
- For every boat, list the marina number, slip number, boat name, owner number, owner’s first name, and owner’s last name.
- For every completed or open service request for routine engine maintenance, list the slip ID, description, and status.
- For every service request for routine engine maintenance, list the slip ID, marina number, slip number, estimated hours, spent hours, owner number, and owner’s last name.
- List the first and last names of all owners who have a boat in a 30-foot slip. Use the IN opera- tor in your query.
- Repeat Exercise 4, but this time use the EXISTS operator in your query.
- List the names of any pair of boats that have the same type. For example, one pair would beAnderson II and Escape, because the boat type for both boats is Sprite 4000. The first name listed should be the major sort key and the second name should be the minor sort key.
- List the boat name, owner number, owner last name, and owner first name for each boat in marina 1.
- Repeat Exercise 7, but this time only list boats in 40-foot slips.
- List the marina number, slip number, and boat name for boats whose owners live in Glander Bay or whose type is Sprite 4000.
- List the marina number, slip number, and boat name for boats whose owners live in Glander Bay and whose type is Sprite 4000.
- List the marina number, slip number, and boat name for boats whose owners live in Glander Bay but whose type is not Sprite 4000.
- Find the service ID and slip ID for each service request whose estimated hours is greater than the number of estimated hours of at least one service request on which the category number is 3.
- Find the service ID and slip ID for each service request whose estimated hours is greater than the number of estimated hours on every service request on which the category number is 3.
- List the slip ID, boat name, owner number, service ID, number of estimated hours, and num- ber of spent hours for each service request on which the category number is 2.
- Repeat Exercise 14, but this time be sure each slip is included regardless of whether the boat in the slip currently has any service requests for category 2.