Question: QUESTION 4 [ 3 0 marks ] NOTE: All SQL syntax must be correct, missing characters will be penalized! BTEE Adventure Tours is a small
QUESTION marks
NOTE: All SQL syntax must be correct, missing characters will be penalized!
BTEE Adventure Tours is a small business that organizes daylong, guided trips to South Africa. To support the
companys growing business, management uses a database to ensure that the companys data is current,
accurate, and easily accessible.
The owner of Colonial Adventure Tours knows that being able to run queries is one of the most important
benefits of using a DBMS Use SQL commands to answer the following exercises, you will use the data in the
Colonial Adventure Tours database shown in the below figures:
Figure presents sample trip data for BTEE Adventure Tours. Each trip is identified by a unique number called
TripID. Furthermore, management tracks the trip name, the trips starting location, and the province in which the
trip originates. In addition, management records the trips total distance in KMs the trips maximum group size,
the trips type, and the season of the year.
Figure : Trip
TripID TripName StartLocation Province Distance MaxGrpSize Type Season
State Park Ride MalotiDrakensberg Park KZN Hiking Summer
Mount Mandela Boschkop Gauteng Biking Early spring
Thaba Tshwaane Grootfontein Bike Park Gauteng Biking Spring
Mount Zweli iSimangaliso Wetland Park KZN Hiking Spring
Gods Window Hazeldean Valley Trails Gauteng Biking Summer
Sharak Hills Underberg KZN Hiking Late Spring
Waterfalls Paarl Western Cape Paddling Early Fall
Njomane Mount Canoeing Mpumalanga Paddling Summer
River Loop Rosemary Hill Farm Gauteng Biking Spring
Swaart Kop Tierpoort Adventure Farm Gauteng Biking Early Spring
Long Pond Velddrif Western cape Paddling Late Spring
Mpuma Falls Kayaking Mpumalanga Paddling Spring
The table named Reservation shown in Figure shows the sample of reservation data for BTEE Adventure
Tours. Each reservation is identified by a unique reservation number that uses the last digits of the current year
followed by a threedigit number that increments sequentially. The table shows the TripID, date, number of
persons, price per person, and other related information.
Figure : Reservation
ReseravtionID TripID TripDate NumPersons TripPrice OtherFees CustomerNum
R R
R R
R R
R R
R R
R R
R R
R R
R R
aWrite the SQL code to list the name of each trip that does not start in KZN
bWrite the SQL code to list the name and start location for each trip that has the type
Biking.
cWrite the SQL code to list the name of each trip that has the type Hiking and that has a
distance greater than twenty kilometers.
dWrite the SQL code to list the name of each trip that has the type Paddling or that is
located in Mpumalanga.
eWrite the SQL command that calculates how many trips have a type of Paddling or Biking.
f Write the SQL code to list the trip name and province for each trip that occurs during the
summer season. Sort the results by trip name within the same province.
gHow many reservations include a trip with a price that is greater than R but less
than R
hWrite the SQL code to delete table RESERVATION from the database.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
