Structured query language (SQL)

EasyMediumHard
1234567
Question 2
Hard

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]

Structured query language (SQL) Questions

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