Courseiva
Aggregation Framework →mediumMultiple Choice

C100DEV Aggregation Framework Practice Question

Which TWO of the following are valid accumulators that can be used within a $group stage?

⚠ Common exam trap

Candidates often select non-accumulator operators like $match or $sort, failing to distinguish between pipeline stages and the specific functions permitted within the $group stage.

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

✓

$sum

The $group stage relies on accumulator expressions to perform calculations across a group of documents. Understanding which operators are available is vital for creating summary reports. $sum and $avg are standard accumulators that allow developers to perform arithmetic operations on grouped data, enabling complex analytical queries that reveal trends and metrics directly from the database layer without requiring application-side processing.

Answer analysis

Option-by-option breakdown

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

  • ✓

    $sum

    Why this is correct

    $sum is a standard accumulator that calculates the sum of all numerical values in the group. It is essential for tasks like calculating total revenue, total item counts, or tallying user engagement metrics across various categories or time periods within a MongoDB aggregation pipeline.

  • ✗

    $match

    Why it's wrong here

    $match is a pipeline stage, not an accumulator. Accumulators are specific operators used within stages like $group or $project to perform calculations on a set of values. $match is used for document filtering and cannot be nested inside a $group expression as a sub-operator.

  • ✓

    $avg

    Why this is correct

    $avg is a standard accumulator that calculates the arithmetic mean of numeric values. It is widely used in analytical reporting to determine average order values, average response times, or mean engagement scores, providing meaningful insights from raw data sets within a single database operation.

  • ✗

    $project

    Why it's wrong here

    $project is a high-level pipeline stage used to reshape documents. It is not an accumulator function. Accumulators are designed to reduce multiple input values into a single output value, whereas $project handles the structural manipulation of documents as they pass through the aggregation pipeline sequence.

  • ✗

    $sort

    Why it's wrong here

    $sort is a pipeline stage used to order documents based on a specified field. It is not an accumulator and cannot be used within a $group configuration object to perform math. It operates on the entire stream of documents rather than reducing a set of values.

About these practice questions

This C100DEV question is part of Courseiva's 259-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official MongoDB exam blueprint

This C100DEV practice question is part of Courseiva's free MongoDB 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 C100DEV exam.