Skip to main content
Aggregation summarizes many rows into metrics like totals, averages, and counts.

What Aggregation Does

Use aggregation when you want:
  • Totals
  • Averages
  • Trends
  • Comparisons across categories

Common Aggregations

  • Sum — total revenue, total sales
  • Average — average order value
  • Count — number of records
  • Min / Max — smallest or largest values
Example: “Total revenue by month”

Grouping Data

Grouping splits results by a category:
  • Revenue by region
  • Orders by product
  • Users by signup month
You can group by:
  • Categories
  • Time
  • Multiple dimensions
Example: “Revenue by region and product category”

Filtering vs Grouping

ActionHappens When
FilteringBefore aggregation
GroupingDuring aggregation
Filtering resultsAfter aggregation
Examples:
  • “Revenue from enterprise customers” → filter first
  • “Regions with revenue over $1M” → aggregate first, then filter

Percentages & Ratios

Use aggregations to compute ratios:
  • Percentage of revenue by segment
  • Share of total orders
  • Conversion ratios
Example: “What percentage of revenue comes from enterprise customers?”

Segment & Benchmark Comparisons

Compare categories and identify outliers:
  • Compare segments: “Compare enterprise versus SMB customers on average order value”
  • Compare to averages: “How does Product X compare to the category average?”
  • Identify outliers: “Which salespeople are above the team average?”
Examples:
  • “Enterprise vs SMB performance”
  • “Compare product X to category average”
  • “Customers whose spending is more than 2 standard deviations above normal”