Courseiva
Data Acquisition and PreparationmediumMultiple ChoiceObjective-mapped

DA0-002 Data Acquisition and Preparation Practice Question

Exhibit

SELECT customer_id, COUNT(*) as order_count FROM orders GROUP BY customer_id HAVING COUNT(*) > 5;

Refer to the exhibit. What does the query return?

⚠ Common exam trap

CompTIA often tests the distinction between 'at least' (>=) and 'more than' (>) in HAVING clauses, and candidates may misread the condition as including exactly 5 orders.

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 have placed more than 5 orders.

The query uses a HAVING clause with COUNT(*) > 5, which filters groups (by customer ID) to only those with more than 5 orders. The GROUP BY customer ID ensures the count is per customer, so the result is customers who have placed more than 5 orders. Option C is correct because the condition is strictly greater than 5, not at least 5.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • All orders grouped by customer ID.

    Why it's wrong here

    The query returns aggregated counts, not individual orders.

  • Customers who have placed at least 5 orders.

    Why it's wrong here

    HAVING >5 excludes those with exactly 5 orders.

  • Customers who have placed more than 5 orders.

    Why this is correct

    HAVING COUNT(*) > 5 ensures only customers with more than 5 orders are included.

  • All customers who have placed orders.

    Why it's wrong here

    The query filters on count > 5, not all customers.

About these practice questions

One of 986 original DA0-002 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.