Generate custom courses on any topic — with hands-on practice, AI guidance, and visuals built in.
Already have an account?
A SQL join is easiest to reason about as row pairing. For each row in the left table, the database searches the right table for rows that satisfy the ON condition, and every match produces one output row that contains columns from both inputs.
To keep that concrete, use two tiny tables, students(id,name) and enrollments(student_id,course), and match them with an equality check where students.id = enrollments.student_id. See how the row pairs form on that one condition.
Once you see a join as pairing, the row count stops being mysterious. Each left row contributes as many output rows as the number of right rows it matches, which can be 0, 1, or many, and the total join size is the sum of those contributions.
Before you look at any SQL, ask a specific question about the same tables. If one student has 2 matching enrollment rows, another has 1, and another has 0, what total number of joined rows should the join produce? Explore the per-student match counts and how they add up.