Question: The database has three tables for tracking horse - riding lessons: Horse with columns: ID - primary key RegisteredName Breed Height BirthDate Student with columns:
The database has three tables for tracking horseriding lessons:
Horse with columns:
ID primary key
RegisteredName
Breed
Height
BirthDate
Student with columns:
ID primary key
FirstName
LastName
Street
City
State
Zip
Phone
EmailAddress
LessonSchedule with columns:
HorseID partial primary key, foreign key references HorseID
StudentID foreign key references StudentID
LessonDateTime partial primary key
Write a SELECT statement to create a lesson schedule with the lesson datetime horse ID and the student's first and last names. Order the results in ascending order by lesson datetime then by horse ID Unassigned lesson times student ID is NULL should not appear in the schedule.
Hint: Perform a join on the Student and LessonSchedule tables, matching the student IDs.
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
