Structured query language (SQL)

EasyMediumHard
1234567
Question 5
Hard

A sailing club charters boats to its members who are preparing for a regatta.

Using the relational database shown below, write an SQL query that lists all sailboat charters for members who currently hold Level 3 certification.

Sailboat

SailboatIDBoatClass
SB01Laser
SB02Topper
SB03Wayfarer
SB04Dart 16
SB05Laser
SB06Wayfarer

Member

MemberIDFirstNameLastNameCertLevel
MEM201ArthurPendelton2
MEM202BeatriceVance3
MEM203CharlesXavier3
MEM204DianaPrince1
MEM205EvelynWright3
MEM206FinlayGibson3
MEM207GeorgiaHarrison2

Charter

CharterIDMemberIDSailboatIDDepositAmount
C501MEM201SB01150.00
C502MEM207SB03200.00
C503MEM202SB05150.00
C504MEM203SB02120.00
C505MEM205SB06200.00
C506MEM206SB04180.00
C507MEM204SB02120.00

The query must only return:

  • both physical names of the member (first and last)
  • the ID of the chartered sailboat
  • the deposit amount.

The final results must be sorted in descending alphabetical order of the members' last names.

[6]

Structured query language (SQL) Questions

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