
Combine data from multiple tables using SQL joins.
A JOIN clause is used to combine rows from two or more tables based on a related column between them. Common types of joins include:
INNER JOIN: Returns records that have matching values in both tablesLEFT JOIN: Returns all records from the left table and matched records from the right tableRIGHT JOIN: Returns all records from the right table and matched records from the left tableLet's practice joining tables to see student enrollments:

SELECT students.name, courses.course_name
FROM students
INNER JOIN enrollments ON students.id = enrollments.student_id
INNER JOIN courses ON enrollments.course_id = courses.id;
SELECT students.name, courses.course_name
FROM students
LEFT JOIN enrollments ON students.id = enrollments.student_id
LEFT JOIN courses ON enrollments.course_id = courses.id;

Choose the appropriate join type based on your needs:
In this lesson, we've learned how to use JOIN statements to combine data from multiple tables. This is a crucial skill for working with relational databases where data is normalized across multiple tables.