Courseiva

AI0-001 AI Models and Data Engineering Practice Question

A data engineer needs to combine two datasets, each with unique customer_id, to include all records from both datasets. Which join type should be used?

⚠ Common exam trap

CompTIA often tests the misconception that LEFT JOIN or RIGHT JOIN can include all records from both datasets, but candidates forget that these asymmetric joins exclude non-matching rows from the opposite side.

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

✓

FULL OUTER JOIN

A FULL OUTER JOIN returns all records from both datasets, matching rows where the customer_id is present in both and filling in NULLs for missing matches. This is the only join type that guarantees every unique customer_id from either dataset appears in the result, which is exactly what the requirement specifies.

Answer analysis

Option-by-option breakdown

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

  • ✓

    FULL OUTER JOIN

    Why this is correct

    A FULL OUTER JOIN returns matched rows plus unmatched rows from both sides, padding missing columns with nulls. Since each dataset holds unique customer_id values, only this join preserves every record from both sources, as the stem requires.

  • ✗

    RIGHT JOIN

    Why it's wrong here

    A RIGHT JOIN returns only unmatched rows from the right dataset plus matches, discarding left-only records, so it cannot include all records from both. It is tempting because it preserves one side's full set, which suits scenarios needing every row from a single designated table rather than the union of both.

  • ✗

    LEFT JOIN

    Why it's wrong here

    LEFT JOIN returns every row from the left dataset plus matches from the right, so records unique to the right dataset are dropped. It is tempting because it preserves one side completely, and would be correct if all left-hand records plus matching right-hand records were needed.

  • ✗

    INNER JOIN

    Why it's wrong here

    INNER JOIN returns only rows whose customer_id appears in both datasets, discarding unmatched records from either side. It is tempting because it is the default join and suits matching related records, and would be correct if only customers present in both datasets were required.

About these practice questions

Courseiva writes every AI0-001 question from scratch — 962 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 AI0-001 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 AI0-001 exam.