Recall & Review
beginner
What is a JOIN in SQL?
A JOIN is a way to combine rows from two or more tables based on a related column between them.
Click to reveal answer
beginner
What does INNER JOIN do when joining multiple tables?
INNER JOIN returns only the rows where there is a match in all joined tables based on the join condition.
Click to reveal answer
intermediate
How do you join three tables named A, B, and C using INNER JOIN?
You write: SELECT * FROM A INNER JOIN B ON A.key = B.key INNER JOIN C ON B.key = C.key;
Click to reveal answer
intermediate
What is the difference between INNER JOIN and LEFT JOIN when joining multiple tables?
INNER JOIN returns only matching rows in all tables; LEFT JOIN returns all rows from the left table and matching rows from the right table, filling with NULLs if no match.
Click to reveal answer
beginner
Why is it important to specify join conditions when joining multiple tables?
Without join conditions, the query creates a Cartesian product, combining every row of one table with every row of the other, which is usually not desired.
Click to reveal answer
Which JOIN type returns only rows with matching keys in all joined tables?
✗ Incorrect
INNER JOIN returns only rows where keys match in all tables.
What happens if you join tables without specifying ON conditions?
✗ Incorrect
Without ON conditions, SQL combines every row of one table with every row of the other.
How do you join three tables A, B, and C correctly?
✗ Incorrect
You must specify join conditions for each join to combine tables properly.
Which JOIN type includes all rows from the left table even if there is no match in the right table?
✗ Incorrect
LEFT JOIN returns all rows from the left table and matched rows from the right.
When joining multiple tables, what is the best practice for readability?
✗ Incorrect
Explicit JOIN with ON conditions makes queries clear and avoids errors.
Explain how to join three tables using INNER JOIN and why join conditions are important.
Think about how tables connect through keys.
You got /3 concepts.
Describe the difference between INNER JOIN and LEFT JOIN when joining multiple tables.
Consider what happens when there is no match.
You got /3 concepts.