DA0-002 Data Analysis Practice Question
Network Topology
Refer to the exhibit. An analyst runs the following query: SELECT product_id, AVG(quantity) FROM sales GROUP BY product_id HAVING AVG(quantity) > 8; Which product_id(s) will be returned?
⚠ Common exam trap
CompTIA often tests the distinction between WHERE and HAVING, and the trap here is that candidates mistakenly think HAVING filters individual rows or that AVG(quantity) > 8 applies to each row, leading them to select only one product_id instead of recognizing the grouped result.
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
✓
P001 and P003
The query groups sales by product_id and filters groups where the average quantity exceeds 8. From the exhibit (not shown but implied), only product_ids P001 and P003 have an AVG(quantity) > 8, so they are returned. The HAVING clause operates on aggregated data after GROUP BY, unlike WHERE which filters rows before aggregation.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
P001 and P003
Why this is correct
P001 average is 9 and P003 average is 12, both >8.
- ✗
P001 only
Why it's wrong here
P003 also has an average of 12, which is >8.
- ✗
P002 only
Why it's wrong here
P002 average is 6, which is not >8.
- ✗
P003 only
Why it's wrong here
P001 also has an average of 9, which is >8.
Go deeper
Related to this question
About these practice questions
This DA0-002 question is part of Courseiva's 986-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.