Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4.14 LAB - Select lesson schedule with multiple joins The database has three tables for tracking horse-riding lessons: 1. Horse with columns: - ID -

image text in transcribed

4.14 LAB - Select lesson schedule with multiple joins The database has three tables for tracking horse-riding lessons: 1. Horse with columns: - ID - primary key - RegisteredName - Breed - Height - BirthDate 2. Student with columns: - ID - primary key - FirstName - LastName - Street - City - State - Zip - Phone - EmailAddress 3. LessonSchedule with columns: - HorselD - partial primary key, foreign key references Horse(ID) - StudentID - foreign key references Student(ID) - LessonDateTime - partial primary key Write a SELECT statement to select all lessons scheduled for Feb 1, 2020 with the lesson date/time, student's first and last names, and the horse's registered name. Order the results in ascending order by lesson date/time, then by the horse's registered name. Make sure unassigned lesson times (student ID is NULL) appear in the results. Hint: Perform a join on the LessonSchedule, Student, and Horse tables, matching the student IDs and horse IDs

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part I Lnai 8724

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448475, 978-3662448472

More Books

Students also viewed these Databases questions

Question

2. What is the impact of information systems on organizations?

Answered: 1 week ago

Question

Evaluate the impact of technology on HR employee services.

Answered: 1 week ago