Challenge: FULL JOIN Usage
In this chapter, you'll learn how to use a different type of table join. Unlike the previous chapters where you could use the same JOIN
, this time you'll need to apply a specific one.
Swipe to start coding
Write a query to retrieve a list of all courses and students, including those courses with no registered students and those students who are not registered for any course.
To accomplish this, you will need to use a specific type of join. Also, retrieve the columns in the exact order as specified:
courses.course_id,
courses.course_name,
courses.description,
enrollments.student_name,
enrollments.enrollment_date
Additionally, sort the result by the course_id
column. Good luck!
Brief Instructions
- Retrieve the necessary columns from the
courses
table. - Use a FULL JOIN to join the
enrollments
table. - The common column for both tables is
courses.course_id = enrollments.course_id
. - Sort the results by
courses.course_id
.
Solution
Thanks for your feedback!
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
What type of table join should I use in this chapter?
Can you explain the differences between the various types of joins?
Can you provide an example of how to use this specific join?
Awesome!
Completion rate improved to 4
Challenge: FULL JOIN Usage
Swipe to show menu
In this chapter, you'll learn how to use a different type of table join. Unlike the previous chapters where you could use the same JOIN
, this time you'll need to apply a specific one.
Swipe to start coding
Write a query to retrieve a list of all courses and students, including those courses with no registered students and those students who are not registered for any course.
To accomplish this, you will need to use a specific type of join. Also, retrieve the columns in the exact order as specified:
courses.course_id,
courses.course_name,
courses.description,
enrollments.student_name,
enrollments.enrollment_date
Additionally, sort the result by the course_id
column. Good luck!
Brief Instructions
- Retrieve the necessary columns from the
courses
table. - Use a FULL JOIN to join the
enrollments
table. - The common column for both tables is
courses.course_id = enrollments.course_id
. - Sort the results by
courses.course_id
.
Solution
Thanks for your feedback!
Awesome!
Completion rate improved to 4single