CERTIFIED-DATA-ANALYST-ASSOCIATE · Question #10
Consider the following two statements: Statement 1: Statement 2: Which of the following describes how the result sets will differ for each statement when they are run in Databricks SQL?
The correct answer is B. When the first statement is run, only rows from the customers table that have at least one match. Option B is correct because it describes the behavior of an INNER JOIN - when Statement 1 uses an INNER JOIN between customers and orders, only customers who have at least one matching order row are included in the result; unmatched customers are excluded entirely. Why the…
Question
Consider the following two statements:
Statement 1:
Statement 2:
Which of the following describes how the result sets will differ for each statement when they are run in Databricks SQL?
Exhibits
Options
- AThe first statement will return all data from the customers table and matching data from the orders
- BWhen the first statement is run, only rows from the customers table that have at least one match
- CThere is no difference between the result sets for both statements.
- DBoth statements will fail because Databricks SQL does not support those join types.
- EWhen the first statement is run, all rows from the customers table will be returned and only the
How the community answered
(36 responses)- A3% (1)
- B69% (25)
- C3% (1)
- D17% (6)
- E8% (3)
Explanation
Option B is correct because it describes the behavior of an INNER JOIN - when Statement 1 uses an INNER JOIN between customers and orders, only customers who have at least one matching order row are included in the result; unmatched customers are excluded entirely.
Why the distractors are wrong:
- A describes a LEFT JOIN result (all customers + matching orders), which would be Statement 2's behavior, not Statement 1's - this reverses the two statements.
- C is wrong because INNER JOIN and LEFT JOIN produce fundamentally different result sets whenever unmatched rows exist in the left table.
- D is wrong because Databricks SQL fully supports both INNER JOIN and LEFT JOIN (and outer join variants generally).
- E also describes LEFT JOIN behavior ("all rows from customers returned"), again attributing the wrong join type to Statement 1.
Memory tip: Think of INNER JOIN as the intersection - like a Venn diagram overlap, you only keep rows that appear in both tables. LEFT JOIN keeps the entire left circle plus whatever matches on the right. If a question asks "which rows are excluded," INNER JOIN excludes non-matching rows from both sides, while LEFT JOIN only excludes non-matching rows from the right table.
Community Discussion
No community discussion yet for this question.

