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
Which subject is the least popular, and how many students are taking it?
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
Can you find which subject is taken the
least and how many students are taking it?
0:00
To figure out which subject is the least
popular let's start by just figuring out
0:03
how many students are taking each subject.
0:07
So, let's start by selecting
everything from the SUBJECTS table.
0:11
Then, let's join from the SUBJECTS
table to the CLASSES table.
0:17
So JOIN CLASSES ON SUBJECTS.ID
= CLASSES.ID,
0:21
or rather CLASSES.SUBJECT_ID.
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