nerdexam
DatabricksDatabricks

CERTIFIED-DATA-ANALYST-ASSOCIATE · Question #91

CERTIFIED-DATA-ANALYST-ASSOCIATE Question #91: Real Exam Question with Answer & Explanation

The correct answer is B: Left Join. A Left Join returns every row from the left (customers) table regardless of whether a match exists in the right (orders) table, filling unmatched rows with NULLs - so a single query produces all customers with their order data populated if they ordered, and NULL order fields if t

Question

A data analyst has been asked to determine which customers have placed an order in the past year and which customers have not placed an order in the past year. This can be determined with one statement by joining the customers table (which is unique by customer ID) and the orders table. Which type of join should the data analyst use?

Options

  • ALeft Semi Join
  • BLeft Join
  • CMiddle Join
  • DLeft Anti Join

Explanation

A Left Join returns every row from the left (customers) table regardless of whether a match exists in the right (orders) table, filling unmatched rows with NULLs - so a single query produces all customers with their order data populated if they ordered, and NULL order fields if they didn't, letting you distinguish both groups at once.

Why the distractors are wrong:

  • A (Left Semi Join): Returns only customers with a matching order, discarding non-matching customers entirely - you'd miss the "no order" group.
  • C (Middle Join): Not a real SQL join type; it doesn't exist.
  • D (Left Anti Join): The opposite of a semi join - returns only customers without a matching order, so you'd miss the "placed an order" group.

Memory tip: Think of Left Join as "keep everyone from the left, show what they matched (or NULL if nothing)." If you need to split a population into matched vs. unmatched, Left Join is your tool; Semi and Anti Joins each show only one side of that split.

Community Discussion

No community discussion yet for this question.

Full CERTIFIED-DATA-ANALYST-ASSOCIATE PracticeBrowse All CERTIFIED-DATA-ANALYST-ASSOCIATE Questions