Courseiva
Data Concepts and EnvironmentsmediumMultiple ChoiceObjective-mapped

DA0-002 Data Concepts and Environments Practice Question

A company's database has a table 'orders' with columns: order_id, customer_id, order_date, and total_amount. A data analyst needs to identify customers who have placed more than 5 orders in the past year. Which data concept should be used to group orders by customer and count them?

⚠ Common exam trap

Many exam-takers confuse filtering (WHERE) with aggregation (GROUP BY), thinking that a WHERE clause alone can count orders per customer, when in fact WHERE only filters rows and cannot produce grouped counts.

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

Aggregation with GROUP BY

The requirement to count orders per customer requires grouping rows by customer_id and then applying a count function. The GROUP BY clause in SQL aggregates rows that share a common value (customer_id) into summary rows, and the COUNT function tallies the number of orders per group. This is the standard approach for such 'per-customer' aggregations.

Answer analysis

Option-by-option breakdown

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

  • Joining with other tables

    Why it's wrong here

    Joining combines tables, not needed here.

  • Filtering with WHERE clause

    Why it's wrong here

    Filtering selects rows, does not group.

  • Sorting with ORDER BY

    Why it's wrong here

    Sorting orders results, does not group.

  • Aggregation with GROUP BY

    Why this is correct

    GROUP BY groups rows and aggregation functions compute counts.

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.