CodingNic

Joins

Module Overview

Joins 5 min read

Module Overview

What You’ll Learn

  • Combine data from multiple tables
  • Choose appropriate join types
  • Write multi-table queries

💡 Why this module matters: Module 9 covered how tables relate, this one covers how to actually ask a question that spans them, “which customer placed each order,” “which products belong to which category,” in a single query.

What’s Covered

  • INNER JOIN, matching rows that exist in both tables.
  • LEFT JOIN and RIGHT JOIN, keeping every row from one side, matched or not.
  • FULL JOIN, keeping every row from both sides.
  • CROSS JOIN, every combination of rows from both tables.
  • SELF JOIN, joining a table to itself.
  • Table aliases, keeping multi-table queries readable.
  • Joining multiple tables, combining more than two tables in one query.

Hands-On

By the end of this module, you’ll join customers and orders, join products and categories, self-join an employee hierarchy, and build multi-table reports.

Next module goes further still, subqueries, CTEs, and conditional logic for questions a single flat query can’t answer.