DA0-002 Data Acquisition and Preparation Practice Question
A data analyst needs to create a recursive CTE to traverse a hierarchical employee-manager table. Which of the following is a key requirement for a recursive CTE?
⚠ Common exam trap
DA0-002 often tests the misconception that the RECURSIVE keyword or a WHERE clause is mandatory; the true structural requirement is the anchor member, which candidates frequently overlook.
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
✓
The recursive CTE must have at least one anchor member that does not reference the CTE
A recursive CTE is defined by two parts: an anchor member that produces the base result set without referencing the CTE itself, and a recursive member that references the CTE and is combined with the anchor via UNION ALL (or UNION). The anchor member is mandatory — without it, the recursion has no starting point and the query fails. This is the defining structural requirement of a recursive CTE.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The CTE must include a WHERE clause in the recursive member
Why it's wrong here
A WHERE clause is optional in the recursive member; it merely filters rows and is not a structural requirement. It is tempting because filtering prevents infinite recursion in practice, but the mandatory elements are an anchor member, a recursive member referencing the CTE, and UNION ALL between them.
- ✗
The CTE must use the RECURSIVE keyword in the WITH clause
Why it's wrong here
The RECURSIVE keyword is required by PostgreSQL and some other engines, but T-SQL (SQL Server) and several others reject it, so it is not a universal requirement. It tempts because many tutorials show it, yet the true requirement is an anchor member combined with a recursive member via UNION ALL.
- ✓
The recursive CTE must have at least one anchor member that does not reference the CTE
Why this is correct
A recursive CTE requires an anchor member returning the base rows plus a recursive member referencing the CTE itself, combined by UNION ALL. The anchor must not reference the CTE, otherwise the query cannot establish its initial result set.
- ✗
The recursive member must use UNION instead of UNION ALL
Why it's wrong here
UNION ALL is standard and permitted; UNION is not mandatory and merely adds duplicate elimination, which can cause errors on recursive rows. It tempts because UNION sounds safer, but the actual requirement is an anchor member plus a recursive member referencing the CTE, joined by UNION ALL.
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 →
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.