Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The owner of Colonial Adventure Tours knows the importance of the SQL language in database management. He realizes that he can use SQL to perform

The owner of Colonial Adventure Tours knows the importance of the SQL language in database management. He realizes that he can use SQL to perform the same functions that you performed with queries in Chapter 2. In each of the following steps, use SQL to obtain the desired results using the data shown in Figures 1-15 through 1-19 in Chapter 1. (If you use a computer to complete these exercises, use a copy of the Colonial Adventure Tours data- base, so you will still have the original data when you complete Chapter 4.) You can use a DBMS to complete the exercises using a computer, or you can simply write the SQL command to complete each step. Check with your instructor if you are uncertain about which approach to take.

  1. List the name of each trip that does not start in New Hampshire (NH).

  2. List the name and start location for each trip that has the type Biking.

  3. List the name of each trip that has the type Hiking and that has a distance of greater than six miles.

  4. List the name of each trip that has the type Paddling or that is located in Vermont (VT).

  5. How many trips have a type of Hiking or Biking?

  6. List the trip name, type, and maximum group size for all trips that have Susan Kiley as a guide.

  7. List the trip name and state for each trip that occurs during the Summer season. Sort the results by trip name within state.

  8. List the name of each trip that has the type Hiking and that is guided by Rita Boyers.

  9. How many trips originate in each state?

  10. How many reservations include a trip with a price that is greater than $20 but less than $75?

  11. List the reservation ID, customer last name, and the trip name for all reservations where the number of persons included in the reservation is greater than four.

  12. List the trip name, the guides first name, and the guides last name for all trips that originate in New Hampshire (NH). Sort the results by guides last name within trip name.

  13. List the reservation ID, customer number, customer last name, and customer first name for all trips that occur in July 2016.

  14. Colonial Adventure Tours calculates the total price of a trip by adding the trip price plus other fees and multiply- ing the result by the number of persons included in the reservation. List the reservation ID, trip name, custo- mers last name, customers first name, and total cost for all reservations where the number of persons is greater than four. Use the column name TotalCost for the calculated field.

  15. Create a new table named Solo that includes the reservation ID, trip ID, trip date, trip price, other fees, and cus- tomer number for all reservations that are for only one person.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

More Books

Students also viewed these Databases questions