DA0-002 Data Acquisition and Preparation Practice Question
A data analyst uses a Common Table Expression (CTE) to query hierarchical employee data (manager_id references employee_id). Which THREE statements about recursive CTEs are correct? (Select THREE).
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 anchor member is the first part of the CTE that does not reference the CTE itself
Recursive CTEs require the WITH RECURSIVE clause (or WITH in some DBMS that imply recursion). The UNION ALL is typical to combine anchor and recursive members. Anchor member is the starting set; recursive member references the CTE itself. The anchor member is defined before the recursive member.
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 anchor member is the first part of the CTE that does not reference the CTE itself
Why this is correct
The anchor member is the non-recursive initial query.
- ✗
Recursive CTEs cannot be used to generate a series of numbers
Why it's wrong here
They can be used to generate sequences, like numbers or dates.
- ✓
A recursive CTE must use the keyword RECURSIVE in the WITH clause
Why this is correct
Most SQL dialects require RECURSIVE for recursive CTEs.
- ✗
The recursive member cannot reference the CTE name
Why it's wrong here
The recursive member must reference the CTE name to achieve recursion.
- ✓
UNION ALL is typically used to combine the anchor and recursive members
Why this is correct
UNION ALL is standard for recursive CTEs.
Go deeper
Related to this question
About these practice questions
Courseiva writes every DA0-002 question from scratch — 986 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 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.