Practice vocabulary for describing SQL JOIN types including INNER, LEFT, CROSS, self-joins, and many-to-many relationships.
0 / 22 completed
1 / 22
Which JOIN type returns only the rows where there is a matching value in both tables?
INNER JOIN returns only matching rows — rows that have a corresponding record in both the left and right tables.
2 / 22
You need to retrieve all customers even if they have never placed an order. Which JOIN should you use?
LEFT JOIN preserves all left-table rows, filling right-side columns with NULL when no matching row exists in the right table.
3 / 22
A CROSS JOIN between a table of 10 rows and a table of 5 rows produces how many rows?
A CROSS JOIN is a Cartesian product — every row from the left table is combined with every row from the right table: 10 × 5 = 50 rows.
4 / 22
To find an employee's manager when both employees and managers live in the same 'employees' table, you would use a _____.
A self-join joins a table to itself, commonly used to traverse hierarchical relationships stored in a single table (e.g., employee → manager).
5 / 22
When a many-to-many JOIN produces far more rows than expected because of duplicate join keys, developers call this a _____.
A many-to-many explosion occurs when both sides of a JOIN have multiple matching rows per key, multiplying the result set to an unexpectedly large size.
6 / 22
Sarah from the QA team just submitted a PR that joins the `users` and `orders` tables using an `INNER JOIN`. During code review, Mark commented: 'I'm not sure this is quite right. We need to ensure we get *all* users, even those who haven't placed any orders yet.' What does Mark likely mean by suggesting a change to the join type?
Consider the potential implications of using an `INNER JOIN` in this scenario.
Mark is pointing out that an `INNER JOIN` *excludes* any user from the `users` table that doesn't have a matching entry in the `orders` table. This means users who haven't placed orders would be silently dropped from the results—a significant oversight when trying to understand the entire customer base. A `LEFT JOIN` (or `RIGHT JOIN`) is designed specifically to include *all* rows from the left (or right) table, even if there's no match in the other table; it's the correct approach for this scenario to avoid excluding inactive users.
7 / 22
PR Description:
During a code review for a new feature that integrates customer data with order information, Alex writes the following in the PR description:
`'We need to ensure we retrieve all customers regardless of whether they have placed an order. This requires joining the `customers` and `orders` tables using a JOIN type that will include all rows from the `customers` table.'
Which of the following JOIN types would best fulfill Alex's requirement?
Alex's requirement to retrieve *all* customers regardless of order history necessitates a join that includes all records from the `customers` table. An INNER JOIN only returns rows where there's a match in both tables; therefore, it would exclude customers without orders. A LEFT JOIN or RIGHT JOIN would include all rows from the left (or right) table respectively, and fill any missing columns with NULL values, which is precisely what's needed to maintain the complete customer list. A FULL OUTER JOIN would also work but is generally less efficient than a `LEFT JOIN` in this scenario.
8 / 22
Alex is designing a query to display all customers and their associated orders. He's considering different JOIN types to achieve this. During code review, his colleague, Ben, points out: 'I'm worried an `INNER JOIN` might exclude customers who haven't placed any orders. We need a way to include *all* customer records, regardless of whether they have related orders.' Which JOIN type would best address Ben's concern and ensure all customers are included in the results?
SELECT * FROM Customers
INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID;
The correct answer is a LEFT JOIN. An INNER JOIN, as Alex initially considered, would exclude any customer without corresponding order data. A LEFT JOIN ensures that all rows from the left table (`Customers`) are included in the result set, regardless of whether there's a matching row in the right table (`Orders`). If a customer has no orders, the columns from the `Orders` table will contain NULL values for that customer. Options An INNER JOIN and A CROSS JOIN would both fail to include customers without related order data; a RIGHT JOIN is less common in this scenario.
9 / 22
Sarah from the QA team just submitted a PR that joins the `users` and `orders` tables using an `INNER JOIN`. During code review, Mark commented: 'I'm not sure this is quite right. We need to ensure we get *all* users, even those who haven't placed any orders yet.' What does Mark likely mean by suggesting a change to the join type?
Consider the potential implications of using an `INNER JOIN` in this scenario.
Mark is pointing out that an `INNER JOIN` *excludes* any user from the `users` table that doesn't have a matching entry in the `orders` table. This means users who haven't placed orders would be silently dropped from the results—a significant oversight when trying to understand the entire customer base. A `LEFT JOIN` (or `RIGHT JOIN`) is designed specifically to include *all* rows from the left (or right) table, even if there's no match in the other table; it's the correct approach for this scenario to avoid excluding inactive users.
10 / 22
PR Description:
During a code review for a new feature that integrates customer data with order information, Alex writes the following in the PR description:
`'We need to ensure we retrieve all customers regardless of whether they have placed an order. This requires joining the `customers` and `orders` tables using a JOIN type that will include all rows from the `customers` table.'
Which of the following JOIN types would best fulfill Alex's requirement?
Alex's requirement to retrieve *all* customers regardless of order history necessitates a join that includes all records from the `customers` table. An INNER JOIN only returns rows where there's a match in both tables; therefore, it would exclude customers without orders. A LEFT JOIN or RIGHT JOIN would include all rows from the left (or right) table respectively, and fill any missing columns with NULL values, which is precisely what's needed to maintain the complete customer list. A FULL OUTER JOIN would also work but is generally less efficient than a `LEFT JOIN` in this scenario.
11 / 22
Alex is designing a query to display all customers and their associated orders. He's considering different JOIN types to achieve this. During code review, his colleague, Ben, points out: 'I'm worried an `INNER JOIN` might exclude customers who haven't placed any orders. We need a way to include *all* customer records, regardless of whether they have related orders.' Which JOIN type would best address Ben's concern and ensure all customers are included in the results?
SELECT * FROM Customers
INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID;
The correct answer is a LEFT JOIN. An INNER JOIN, as Alex initially considered, would exclude any customer without corresponding order data. A LEFT JOIN ensures that all rows from the left table (`Customers`) are included in the result set, regardless of whether there's a matching row in the right table (`Orders`). If a customer has no orders, the columns from the `Orders` table will contain NULL values for that customer. Options An INNER JOIN and A CROSS JOIN would both fail to include customers without related order data; a RIGHT JOIN is less common in this scenario.
12 / 22
Sarah from the QA team just submitted a PR that joins the `users` and `orders` tables using an `INNER JOIN`. During code review, Mark commented: 'I'm not sure this is quite right. We need to ensure we get *all* users, even those who haven't placed any orders yet.' What does Mark likely mean by suggesting a change to the join type?
Consider the potential implications of using an `INNER JOIN` in this scenario.
Mark is pointing out that an `INNER JOIN` *excludes* any user from the `users` table that doesn't have a matching entry in the `orders` table. This means users who haven't placed orders would be silently dropped from the results—a significant oversight when trying to understand the entire customer base. A `LEFT JOIN` (or `RIGHT JOIN`) is designed specifically to include *all* rows from the left (or right) table, even if there's no match in the other table; it's the correct approach for this scenario to avoid excluding inactive users.
13 / 22
PR Description:
During a code review for a new feature that integrates customer data with order information, Alex writes the following in the PR description:
`'We need to ensure we retrieve all customers regardless of whether they have placed an order. This requires joining the `customers` and `orders` tables using a JOIN type that will include all rows from the `customers` table.'
Which of the following JOIN types would best fulfill Alex's requirement?
Alex's requirement to retrieve *all* customers regardless of order history necessitates a join that includes all records from the `customers` table. An INNER JOIN only returns rows where there's a match in both tables; therefore, it would exclude customers without orders. A LEFT JOIN or RIGHT JOIN would include all rows from the left (or right) table respectively, and fill any missing columns with NULL values, which is precisely what's needed to maintain the complete customer list. A FULL OUTER JOIN would also work but is generally less efficient than a `LEFT JOIN` in this scenario.
14 / 22
Alex is designing a query to display all customers and their associated orders. He's considering different JOIN types to achieve this. During code review, his colleague, Ben, points out: 'I'm worried an `INNER JOIN` might exclude customers who haven't placed any orders. We need a way to include *all* customer records, regardless of whether they have related orders.' Which JOIN type would best address Ben's concern and ensure all customers are included in the results?
SELECT * FROM Customers
INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID;
The correct answer is a LEFT JOIN. An INNER JOIN, as Alex initially considered, would exclude any customer without corresponding order data. A LEFT JOIN ensures that all rows from the left table (`Customers`) are included in the result set, regardless of whether there's a matching row in the right table (`Orders`). If a customer has no orders, the columns from the `Orders` table will contain NULL values for that customer. Options An INNER JOIN and A CROSS JOIN would both fail to include customers without related order data; a RIGHT JOIN is less common in this scenario.
15 / 22
Sarah from the QA team just submitted a PR that joins the `users` and `orders` tables using an `INNER JOIN`. During code review, Mark commented: 'I'm not sure this is quite right. We need to ensure we get *all* users, even those who haven't placed any orders yet.' What does Mark likely mean by suggesting a change to the join type?
Consider the potential implications of using an `INNER JOIN` in this scenario.
Mark is pointing out that an `INNER JOIN` *excludes* any user from the `users` table that doesn't have a matching entry in the `orders` table. This means users who haven't placed orders would be silently dropped from the results—a significant oversight when trying to understand the entire customer base. A `LEFT JOIN` (or `RIGHT JOIN`) is designed specifically to include *all* rows from the left (or right) table, even if there's no match in the other table; it's the correct approach for this scenario to avoid excluding inactive users.
16 / 22
PR Description:
During a code review for a new feature that integrates customer data with order information, Alex writes the following in the PR description:
`'We need to ensure we retrieve all customers regardless of whether they have placed an order. This requires joining the `customers` and `orders` tables using a JOIN type that will include all rows from the `customers` table.'
Which of the following JOIN types would best fulfill Alex's requirement?
Alex's requirement to retrieve *all* customers regardless of order history necessitates a join that includes all records from the `customers` table. An INNER JOIN only returns rows where there's a match in both tables; therefore, it would exclude customers without orders. A LEFT JOIN or RIGHT JOIN would include all rows from the left (or right) table respectively, and fill any missing columns with NULL values, which is precisely what's needed to maintain the complete customer list. A FULL OUTER JOIN would also work but is generally less efficient than a `LEFT JOIN` in this scenario.
17 / 22
Alex is designing a query to display all customers and their associated orders. He's considering different JOIN types to achieve this. During code review, his colleague, Ben, points out: 'I'm worried an `INNER JOIN` might exclude customers who haven't placed any orders. We need a way to include *all* customer records, regardless of whether they have related orders.' Which JOIN type would best address Ben's concern and ensure all customers are included in the results?
SELECT * FROM Customers
INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID;
The correct answer is a LEFT JOIN. An INNER JOIN, as Alex initially considered, would exclude any customer without corresponding order data. A LEFT JOIN ensures that all rows from the left table (`Customers`) are included in the result set, regardless of whether there's a matching row in the right table (`Orders`). If a customer has no orders, the columns from the `Orders` table will contain NULL values for that customer. Options An INNER JOIN and A CROSS JOIN would both fail to include customers without related order data; a RIGHT JOIN is less common in this scenario.
18 / 22
During a code review of a new API endpoint that retrieves customer order details, David asks the developer: 'Can you explain why you're using an `INNER JOIN` here? I'm concerned it might miss orders for customers who haven't placed any.' What is the primary reason INNER JOIN could lead to this issue?
An `INNER JOIN` *only* returns rows where there's a matching key in both tables. Therefore, if a customer hasn't placed any orders, that customer record won't have a corresponding entry in the `orders` table, and thus will be excluded from the result set. This is a common misconception – it doesn't mean `INNER JOIN` is inherently bad; it just means you need to choose the right join type for your needs.
19 / 22
You're in a Slack channel discussing a query with another developer. You want to emphasize that using a `LEFT JOIN` is crucial when you need *all* rows from the left table, even if there's no match in the right table. What phrasing would best convey this?
The core function of a `LEFT JOIN` is to return *all* rows from the left table (the one specified before the `LEFT JOIN` keyword), and matching rows from the right table. If there's no match in the right table, it fills in NULL values for the columns from the right table. This contrasts with an `INNER JOIN`, which only returns rows where a match exists.
20 / 22
Alex is writing a PR description to explain his SQL query that joins the `products` and `categories` tables. He wants to clearly state when he's using an `INNER JOIN`. Which of the following descriptions best communicates this?
A good PR description should clearly explain *why* a specific join type was chosen. An `INNER JOIN` means that only products with assigned categories and categories with associated products will be returned. This avoids ambiguity about the data being included in the result set.
21 / 22
During your daily stand-up, you're explaining that you've implemented a query using a `FULL OUTER JOIN` to reconcile customer data from two different systems. You want to ensure the team understands the purpose. What concise statement would best describe your work?
A `FULL OUTER JOIN` is specifically designed to return *all* rows from both tables. If there's no match between records in the two tables, it fills in NULL values. This is useful when you need a complete view of all data, regardless of whether it's duplicated across systems.
22 / 22
Mark, during code review, asks: 'You've used a `CROSS JOIN` here. Can you explain the rationale? It seems like a very large result set.' What is the most likely reason for using a `CROSS JOIN` in this scenario?
A `CROSS JOIN` (or Cartesian product) generates *every* possible combination of rows from the two tables. This results in a much larger result set than anticipated if there's no logical relationship between the data. It's rarely appropriate unless you specifically need all combinations; it's often an indication that a different join type or a rethinking of the query logic is needed.
What does the "SQL JOINs Vocabulary" exercise practise?
Practice vocabulary for describing SQL JOIN types including INNER, LEFT, CROSS, self-joins, and many-to-many relationships.
How many questions are in this exercise?
This exercise has 22 questions, each multiple-choice with a full explanation shown after you answer.
What English level is this exercise for?
This exercise is tagged Intermediate. If the vocabulary feels difficult, browse the Database & SQL category page for an easier module to start with.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free with no account, sign-up, or paywall.
Do I get feedback if I answer incorrectly?
Yes — whichever option you choose, right or wrong, you'll immediately see an explanation clarifying the correct term and why the other options don't fit.
Can I retry this exercise?
Yes — once you finish all the questions, a "Try again" button on the results screen resets the exercise so you can practise as many times as you like.
Do I need an account to track my progress?
No account is required. Your progress bar and score for this session are tracked in the browser as you go, but nothing is saved once you leave the page.
Is "SQL JOINs Vocabulary" part of a larger series?
Yes — it's one exercise in the Database & SQL category on CoderSlingo. See the category page for the full list of related exercises on similar terminology.
Can I link directly to this exercise?
Yes — this exercise has its own permanent URL, so you can bookmark it or share the link directly with a colleague or study partner.
Where can I find more exercises like this one?
See the Database & SQL category page for related exercises, or browse the main Exercises hub for other IT English topics.