Courseiva
Data Analysis →easyMultiple Choice

DA0-002 Data Analysis Practice Question

A data analyst needs to join two tables in a SQL database: Orders and Customers. The analyst wants to include all orders, even if there is no matching customer record. Which type of join should be used?

⚠ Common exam trap

Test-takers frequently confuse LEFT JOIN with RIGHT JOIN, mistakenly thinking they need to 'keep all customers' instead of 'keep all orders,' or they overcomplicate the requirement by choosing FULL OUTER JOIN when only one side needs to be preserved.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

LEFT JOIN

A LEFT JOIN returns all rows from the left table (Orders) and the matching rows from the right table (Customers). If there is no match, NULL values are returned for the right table's columns. This satisfies the requirement to include all orders, even those without a matching customer record.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    RIGHT JOIN

    Why it's wrong here

    A RIGHT JOIN preserves every row from the right-hand table, so unmatched Customers rows survive while orders without a matching customer are dropped. It is tempting because it does retain one table's unmatched rows; it would be correct if Customers, not Orders, were the table needing full retention.

  • ✗

    FULL OUTER JOIN

    Why it's wrong here

    A FULL OUTER JOIN returns every row from both Orders and Customers, including customers with no orders, so the result set exceeds the requirement. It is tempting because it does guarantee all orders survive; it would be correct only when unmatched rows from both tables must be preserved.

  • ✓

    LEFT JOIN

    Why this is correct

    A LEFT JOIN returns every row from the left table (Orders) and matches rows from Customers where they exist, filling NULLs otherwise. Because the stem requires all orders to appear even without a matching customer, this outer join preserves the unmatched left-side rows.

  • ✗

    INNER JOIN

    Why it's wrong here

    An INNER JOIN returns only rows where an order's customer key matches a Customers record, discarding orders lacking a matching customer. It is tempting because it is the default join and suits scenarios requiring only matched pairs, but it cannot preserve unmatched order rows.

About these practice questions

Courseiva writes every DA0-002 question from scratch — 1,004 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DA0-002 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DA0-002 exam.