From BU Computer Science
Jump to navigation Jump to search

Homework for SQL on single tables

This homework uses the sailors data

Only turn in the sql statements (not the results of the query). You may test your queries out online. (But remember, just because you get the right data back, that does not mean your query is correct!). Turn in a hard copy on Match 17th at the start of class.


  1. Find the ids of the sailors who have reserved boat number 103.
  2. What is the color of the clipper boat?
  3. What are the different ratings of people in their 30's?
  4. What sailor names are three letters long?
  5. How many red boats are there?
  6. What are the different colors of the boats (don't list duplicate colors)?
  7. How many different times has each boat been reserved?
  8. What is the date of the earliest reservation?
  9. What is the current highest rating?
  10. What is the age of the youngest person?