Exercise: Students and Instructors
Get student names with their instructor.
Solution
sql
1SELECT s.name, c.instructor
2FROM students s
3INNER JOIN courses c ON s.course_id = c.id;
Get student names with their instructor.
1SELECT s.name, c.instructor
2FROM students s
3INNER JOIN courses c ON s.course_id = c.id;