SELECT statement are used to retrieve data from a database table
The SELECT statement that creates the lesson schedule is:
<em>SELECT LessonDateTime, HorseID, FirstName, LastName FROM LessonSchedule JOIN Student ON LessonSchedule.StudentID = Student.ID ORDER BY LessonDateTime ASC, HorseID</em>
<h3>How to determine the SELECT statement</h3>
To write the select statement, we start by writing the following query that retrieves Lesson date/time, horse ID, first name, and last name from the lesson schedule table.
So, we have:
SELECT LessonDateTime, HorseID, FirstName, LastName FROM LessonSchedule
Next, the query would confirm the presence of a student ID in the lesson schedule table and the student table using the JOIN statement
JOIN Student ON LessonSchedule.StudentID = Student.ID
From the question, we understand that:
The result should be sorted in ascending order by lesson date/time.
This is represented as:
ORDER BY LessonDateTime ASC, HorseID
Hence, the complete query is:
SELECT LessonDateTime, HorseID, FirstName, LastName FROM LessonSchedule JOIN Student ON LessonSchedule.StudentID = Student.ID ORDER BY LessonDateTime ASC, HorseID
Read more about database at:
brainly.com/question/24223730