DA0-002 Data Acquisition and Preparation Practice Question
Which TWO of the following are valid SQL clauses used to filter and sort data?
⚠ Common exam trap
CompTIA often tests the distinction between SQL DML statements (DELETE, UPDATE, INSERT) and query clauses (WHERE, ORDER BY), trapping candidates who confuse data manipulation commands with data retrieval or sorting operations.
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
✓
WHERE
Option B, WHERE, is correct because it is the SQL clause that filters rows by applying a Boolean predicate to each row before it is returned, as in SELECT ... FROM table WHERE condition. Option C, ORDER BY, is correct because it is the SQL clause that sorts the result set by one or more columns, optionally with ASC or DESC, as in SELECT ... FROM table ORDER BY column. The remaining options are not filtering or sorting clauses: DELETE (A) is a DML statement that removes rows, UPDATE (D) is a DML statement that modifies existing rows, and INSERT (E) is a DML statement that adds new rows.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
DELETE
Why it's wrong here
DELETE removes rows and, although it accepts a WHERE predicate, that predicate selects rows for removal rather than filtering a result set, and DELETE cannot order output. It is tempting as a common SQL statement, but it is data manipulation, not the filtering and sorting clauses the question asks for.
- ✓
WHERE
Why this is correct
WHERE filters rows before grouping or aggregation, applying a predicate to each row and returning only those satisfying the condition. This directly satisfies the stem's requirement for a valid SQL filtering clause, distinct from sorting clauses such as ORDER BY. It cannot sort results, but filtering alone qualifies it as one of the two valid answers.
- ✓
ORDER BY
Why this is correct
ORDER BY sorts the result set by one or more columns, satisfying the sorting half of the requirement. It operates on the final result after filtering, unlike WHERE, which restricts rows. Together with a filtering clause, it forms the standard SELECT statement structure.
- ✗
UPDATE
Why it's wrong here
UPDATE modifies existing row values and supports no result-set filtering or ordering clause of its own. It is tempting because its SET clause often carries a WHERE predicate, but that predicate restricts which rows change rather than filtering a query result, and UPDATE cannot sort output.
- ✗
INSERT
Why it's wrong here
INSERT adds rows to a table; it contains no filtering predicate and no ordering capability, so it cannot satisfy a question about filtering and sorting. It is tempting as a familiar SQL keyword, yet it belongs to data manipulation, whereas WHERE and ORDER BY perform the filtering and sorting the stem requires.
About these practice questions
This DA0-002 question is part of Courseiva's 1,004-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.