Courseiva

DA0-002 Data Acquisition and Preparation Practice Question

A data analyst is preparing a dataset for analysis and needs to combine data from two tables: 'orders' and 'customers'. The 'orders' table contains a 'customer_id' column, and the 'customers' table contains a 'customer_id' column as the primary key. The analyst wants to include all orders, even those without matching customers. Which type of join should be used?

⚠ Common exam trap

The trap here is assuming that a FULL OUTER JOIN is needed to keep all orders, but it also brings in customers without orders.

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

To preserve all rows from the orders table regardless of matching customers, a LEFT JOIN is appropriate. It keeps every order and appends customer details when available. Other join types either exclude unmatched orders or include extra unmatched customers, which is not desired.

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 returns all rows from the right table (customers) and matching rows from the left table (orders). Orders without a matching customer would be excluded because they have no corresponding row in the right table. This does not meet the requirement to include all orders.

  • ✗

    INNER JOIN

    Why it's wrong here

    An INNER JOIN returns only rows where there is a match in both tables. If an order has no matching customer, it would be excluded. Since the requirement is to include all orders, even those without matching customers, INNER JOIN would incorrectly drop those orders and is not suitable.

  • ✓

    LEFT JOIN

    Why this is correct

    A LEFT JOIN returns all rows from the left table (orders) and matching rows from the right table (customers). If there is no match, NULLs are returned for customer columns. This ensures all orders are included, satisfying the requirement to keep orders without matching customers.

  • ✗

    FULL OUTER JOIN

    Why it's wrong here

    A FULL OUTER JOIN returns all rows from both tables, matching where possible. While it would include all orders, it would also include customers with no orders, which is not required and could introduce unwanted rows. The scenario specifically asks for all orders only, so a full outer join is excessive.

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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

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.