Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed SQL Reporting by Example!
You have completed SQL Reporting by Example!
Preview
Do any teachers teach multiple subjects? If so, who and which subjects?
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
And if so, which teachers, and
which subjects do they teach?
0:00
To figure out if any teachers
teach multiple subjects,
0:02
we need to join from the teachers
table to the classes table.
0:06
So, let's start by selecting
everything from the teacher's table,
0:09
and then joining to the classes table
on TEACHERS.ID = CLASSES.TEACHER_ID.
0:14
And since we're just trying to figure
out if they teach multiple subjects,
0:21
and we don't need to know
which subjects those are,
0:25
we don't actually need to join
through to the subject table.
0:27
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up