The correct answer is customers who placed more than 5 orders in 2023. This result is achieved by using the SQL HAVING clause to filter groups with COUNT comparison, specifically COUNT(*) > 5, which excludes any customer with exactly 5 or fewer orders. The WHERE clause first narrows the dataset to only orders from 2023, then GROUP BY customer_id aggregates each customer’s orders, and finally HAVING applies the condition to the grouped count. On the CompTIA Data+ DA0-001 exam, this tests your understanding that HAVING filters after aggregation, while WHERE filters before grouping—a common trap is confusing HAVING with WHERE or forgetting that HAVING can only reference aggregate functions. A reliable memory tip: “WHERE works on rows, HAVING works on groups.”
DA0-001 Mining and Acquiring Data Practice Question
This DA0-001 practice question tests your understanding of mining and acquiring data. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
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?
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;
A
Customers who placed more than 5 orders in 2023
The HAVING clause filters for counts greater than 5.
B
All customers who placed at least 5 orders in 2023
Why wrong: HAVING COUNT > 5 means more than 5, not at least 5.
C
The total number of orders per customer in 2023
Why wrong: This describes the result without the HAVING filter.
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.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
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.
Related concept
Read the scenario before looking for a memorised answer.
✗
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.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is confusing the comparison operator '>' with '>=', leading candidates to mistakenly include customers with exactly 5 orders when the query explicitly excludes them.
Detailed technical explanation
How to think about this question
The HAVING clause filters groups after aggregation, unlike WHERE which filters rows before grouping. In SQL, COUNT(*) counts all rows in each group, including NULLs, while COUNT(column) excludes NULLs. A real-world scenario is identifying high-value customers for loyalty programs, where precise thresholds like 'more than 5' prevent misclassification of borderline cases.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A practitioner preparing for the DA0-001 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Mining and Acquiring Data — This question tests Mining and Acquiring Data — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: 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.
What should I do if I get this DA0-001 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
This DA0-001 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-001 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.