Structured query language (SQL)

EasyMediumHard
1234567
Question 7
Hard

Due to a mechanical restriction with the boat 'Hydra', the vessel cannot carry the specialized gas mixtures required for deep dives. Consequently, any excursions booked on the boat 'Hydra' to dive sites with a maximum depth of more than 30 metres must be flagged for rescheduling.

The dive centre manager needs to retrieve the diver's last name, the dive date, and the excursion time for all bookings made on the boat 'Hydra' for dive sites where the maximum depth exceeds 30 metres.

Study the database schema below and write an SQL query to retrieve this information. The results must be displayed in date order.

DiveSite

SiteNameDifficultyMaxDepthMMarineLifeRatingFee
Blue HoleExpert455120.00
Coral GardenBeginner12445.00
Shipwreck CoveIntermediate35585.00
Sandy ShallowsBeginner8230.00
Shark AlleyAdvanced405150.00

Booking

BoatNameSiteNameDiveDateDiveTimeDiverLastNameInstructorName
HydraBlue Hole15/05/2508:30MillerCaptain Jack
ZephyrCoral Garden15/05/2510:00DupontCaptain Sarah
HydraSandy Shallows15/05/2513:00TanakaCaptain Jack
TritonShipwreck Cove16/05/2509:00RossiCaptain Jack
HydraShark Alley16/05/2514:30MillerCaptain Sarah
[6]

Structured query language (SQL) Questions

  1. GCSE
  2. /Computer Science
  3. /Structured query language (SQL)