Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
FULL JOIN Usage | Joining Tables
course content

Contenido del Curso

Intermediate SQL

FULL JOIN UsageFULL JOIN Usage

In this chapter, you will need to use a specific type of table join, unlike the previous two chapters where, in theory, you could use the same type of JOIN.

I will remind you that we are working with two tables:

courses:

course_id course_name description
1 Introduction to Programming Learn the basics of programming using Python.
2 Data Structures and Algorithms In-depth study of data structures and algorithms.
3 Web Development Learn how to build web applications using HTML, CSS, and JavaScript.
4 Database Management Understand database concepts and SQL.
... ... ...
11 DevOps Fundamentals Learn the principles and practices of DevOps.

enrollments:

enrollment_id student_name course_id enrollment_date
1 Alice Johnson 1 2023-01-15T00:00:00Z
2 Bob Brown 2 2023-01-20T00:00:00Z
3 Charlie Davis 1 2023-01-25T00:00:00Z
4 David Evans 2023-02-01T00:00:00Z
... ... ... ...
20 Tina Upton 7 2023-05-01T00:00:00Z

Tarea

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:

Additionally, sort the result by the course_id column. Good luck!

¿Todo estuvo claro?

Sección 3. Capítulo 7
toggle bottom row
course content

Contenido del Curso

Intermediate SQL

FULL JOIN UsageFULL JOIN Usage

In this chapter, you will need to use a specific type of table join, unlike the previous two chapters where, in theory, you could use the same type of JOIN.

I will remind you that we are working with two tables:

courses:

course_id course_name description
1 Introduction to Programming Learn the basics of programming using Python.
2 Data Structures and Algorithms In-depth study of data structures and algorithms.
3 Web Development Learn how to build web applications using HTML, CSS, and JavaScript.
4 Database Management Understand database concepts and SQL.
... ... ...
11 DevOps Fundamentals Learn the principles and practices of DevOps.

enrollments:

enrollment_id student_name course_id enrollment_date
1 Alice Johnson 1 2023-01-15T00:00:00Z
2 Bob Brown 2 2023-01-20T00:00:00Z
3 Charlie Davis 1 2023-01-25T00:00:00Z
4 David Evans 2023-02-01T00:00:00Z
... ... ... ...
20 Tina Upton 7 2023-05-01T00:00:00Z

Tarea

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:

Additionally, sort the result by the course_id column. Good luck!

¿Todo estuvo claro?

Sección 3. Capítulo 7
toggle bottom row
some-alt