DA0-002 Data Acquisition and Preparation Practice Question
An analyst is using SQL to analyze employee data. Which THREE of the following are valid uses of the WHERE clause? (Select three.)
⚠ Common exam trap
DA0-002 often tests the WHERE vs HAVING distinction — candidates incorrectly use WHERE for aggregate filtering or confuse ORDER BY (sorting) with WHERE (filtering).
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
✓
Filter rows where manager_id is NULL using IS NULL
Option C is correct because the WHERE clause can test for NULL values with the IS NULL predicate, so filtering rows where manager_id is NULL is a valid row-level filter. Option D is correct because WHERE supports the LIKE operator for pattern matching, so filtering names that start with 'J' (e.g., name LIKE 'J%') is a valid use. Option E is correct because WHERE supports the BETWEEN operator for range comparisons, so filtering salaries between 50,000 and 70,000 is a valid row-level filter. Option A is incorrect because sorting the result set is done with the ORDER BY clause, not WHERE. Option B is incorrect because filtering groups after aggregation is performed with the HAVING clause, not WHERE, which filters rows before grouping.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Sort the result set by hire_date
Why it's wrong here
Sorting is performed by ORDER BY, not WHERE; the WHERE clause restricts rows before grouping. It is tempting because both clauses appear in the same SELECT statement and filter output visually, but WHERE cannot order results — ORDER BY is the correct clause for hire_date sequencing.
- ✗
Filter groups after aggregation using HAVING
Why it's wrong here
HAVING filters aggregated groups after GROUP BY, whereas WHERE filters individual rows before aggregation; they are distinct clauses. It is tempting because both restrict results, but WHERE cannot reference aggregate functions, so post-aggregation filtering must use HAVING instead.
- ✓
Filter rows where manager_id is NULL using IS NULL
Why this is correct
IS NULL tests for the absence of a value, correctly filtering rows where manager_id holds no data. Equality operators cannot match NULL because SQL treats it as unknown, so IS NULL is the only valid predicate for this filter.
- ✓
Filter rows where the name starts with 'J' using LIKE
Why this is correct
LIKE performs pattern matching on character data, so 'J%' returns rows whose name begins with J. This filters individual rows before aggregation, satisfying the stem's requirement for a valid WHERE clause use on employee data.
- ✓
Filter rows where salary is between 50,000 and 70,000 using BETWEEN
Why this is correct
BETWEEN is an inclusive range operator, returning rows where salary falls within the 50,000 to 70,000 boundaries. It filters rows at the row level, which is precisely what the WHERE clause does in this employee dataset.
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.