All courses
· beginner

Joining Data in SQL

Real data lives in several tables at once. Learn to combine them deliberately, keep the rows you meant to keep, and spot the joins that quietly inflate your numbers.

Pathaxis · Original content

Written in house, from the work rather than from a syllabus. Every example is one we would use ourselves, and every exercise is checked against the same engine that grades your answer.

100 min 7 lessons 12 quiz questions 6 exercisesStart course

What you’ll learn

  • Explain why data is split across tables and how keys reconnect it
  • Choose between INNER, LEFT, RIGHT and FULL joins on purpose
  • Join three or more tables without losing rows by accident
  • Use a self-join to compare rows within one table
  • Recognise fan-out and stop a join from double counting

Before you start

  • · SQL Foundations, or comfort with SELECT, WHERE and GROUP BY
  • · No knowledge of joins assumed

Syllabus

01

Relating tables

Why data is split up, and how a key puts it back together.

02

Keeping unmatched rows

The outer joins, and what they are actually for.

03

Harder shapes

Three tables, a table joined to itself, and the trap that inflates totals.