Skip to content

Course home

Structured query language (SQL)

Structured query language (SQL)

EasyMediumHard
1234567
Question 2

Due to temporary maintenance in Room 1 of the veterinary clinic, the room is not suitable for procedures involving animals with a maximum weight of more than 40 kg.

The clinic manager needs to find out the owner's last name, date, and appointment time for all bookings made in Room 1 for treatments where the maximum weight of the animal can exceed 40 kg.

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

Treatment

TreatmentNameTargetSpeciesMinAgeWeeksMaxWeightKgPrice
Rabies VaccineDog128045.00
Flea TreatmentCat81515.00
MicrochippingDog69025.00
Dental CleanCat5212120.00
SpayingDog2440200.00

Appointment

RoomNoTreatmentNameAppDateAppTimeOwnerLastNameVetName
1Rabies Vaccine12/10/2409:00SmithDr. Evans
2Flea Treatment12/10/2410:30PatelDr. Green
1Spaying12/10/2411:00JonesDr. Evans
3Dental Clean13/10/2414:00WongDr. Evans
1Microchipping13/10/2409:30SmithDr. Green
[6]
Markscheme

Structured query language (SQL) Questions

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

25 exam-style questions on AQA GCSE Computer Science Structured query language (SQL). Each one has a worked solution and a mark scheme showing where the marks go.

Question bank