The owner of Colonial Adventure Tours knows the importance of the SQL language in database management. He
Question:
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 multiplying the result by the number of persons included in the reservation. List the reservation ID, trip name, customers 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 customer number for all reservations that are for only one person.
16. Use an update query to change the OtherFees value in the Solo table to $5.00 for all records on which the OtherFees value is $0.00.
17. Use a delete query to delete all trips in the Solo table where the trip date is 9/12/2016.
18. There are multiple ways to create the query in Step 13. Write the SQL command that you used and then write an alternate command that also would obtain the correct result.
19. The following SQL code produces an error message. What is wrong with the code and how would you correct it?
SELECT ReservationID, TripID, TripName
FROM Reservation, Trip
WHERE Reservation.TripID¼Trip.TripID;
Figure 1-15
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Concepts of Database Management
ISBN: 978-1285427102
8th edition
Authors: Philip J. Pratt, Mary Z. Last
Question Posted: