DA0-002 Data Acquisition and Preparation Practice Question
Exhibit
Refer to the exhibit. SELECT customer_id, COUNT(order_id) AS order_count FROM orders WHERE order_date BETWEEN '2023-01-01' AND '2023-12-31' GROUP BY customer_id HAVING COUNT(order_id) > 5;
An analyst is reviewing the above SQL query used to acquire data. What does this query retrieve?
⚠ Common exam trap
Watch out — candidates often confuse the comparison operator '>' with '>=', leading candidates to mistakenly include customers with exactly 5 orders when the query explicitly excludes them.
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
✓
Customers who placed more than 5 orders in 2023
The SQL query uses a HAVING clause with COUNT(*) > 5 to filter customers who placed more than 5 orders in 2023. The WHERE clause restricts records to the year 2023, and the GROUP BY customer_id aggregates orders per customer. The condition '> 5' explicitly excludes customers with exactly 5 or fewer orders, making option A correct.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Customers who placed more than 5 orders in 2023
Why this is correct
The HAVING clause filters for counts greater than 5.
- ✗
All customers who placed at least 5 orders in 2023
Why it's wrong here
HAVING COUNT > 5 means more than 5, not at least 5.
- ✗
The total number of orders per customer in 2023
Why it's wrong here
This describes the result without the HAVING filter.
- ✗
Customers who placed exactly 5 orders in 2023
Why it's wrong here
The condition is >5, not =5.
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.