Name:

All select statements should be tee'd into a file called lab2.answers in your home directory.

  1. (2 points) Using the car and manufacturer tables from last week, write a SELECT statement that displays the Manufacturer name, model, purchaseDate, and color of all the blue cars.
  2. (2 points) Using the car and manufacturer tables from last week, write a SELECT statement that displays the Manufacturer name, model, purchaseDate, and color of all the red cars.
  3. (2 points) Using the car and manufacturer tables from last week, write a SELECT statement that displays the Manufacturer name, model, purchaseDate, and color of all the red and blue cars.
  4. (2 points) Using the car and manufacturer tables from last week, write a SELECT statement that displays the Manufacturer name, model, purchaseDate, and color of all the cars which are NOT blue.
  5. (2 points) Using the car and manufacturer tables from last week, write a SELECT statement that displays the Manufacturer name, model, purchaseDate, and color of all the cars which are NOT red.
  6. (2 points) Using the car and manufacturer tables from last week, write a SELECT statement that displays the Manufacturer name, model, purchaseDate, and color of all the cars which are neither red nor blue.
  7. (2 points) Using the car and manufacturer tables from last week, write a SELECT statement that displays the Manufacturer name, model, purchaseDate, and color of all the red toyotas.
  8. (2 points) Using the car and manufacturer tables from last week, write a SELECT statement that displays the Manufacturer name, model, purchaseDate, and color of all the red fords.
  9. (2 points) Using the car and manufacturer tables from last week, write a SELECT statement that displays the Manufacturer name, model, purchaseDate, and color of all the cars purchased in or after 2001.
  10. (2 points) Using the car and manufacturer tables from last week, write a SELECT statement that displays the Manufacturer name, model, purchaseDate, and color of all the cars purchased before 2001.
  11. (1 point) show the commands necessary to delete all tables from your database.
  12. (4 points) show the command necessary to restore your database from the backup which exists in your home directory named db_backup.sql