--- slug: /search/search-query-language/group-aggregate-operators title: Group or Aggregate Operators description: Understand and use group and aggregate operators in Sumo Logic to summarize, transform, and visualize data from your logs and metrics. canonical: https://www.sumologic.com/help/docs/search/search-query-language/group-aggregate-operators/ --- import useBaseUrl from '@docusaurus/useBaseUrl'; In this section, we'll introduce the following concepts:
Queries icon

Overview

Learn how aggregating (group-by) functions evaluate messages and place them into groups.

Queries icon

avg

Calculates the avg value of a numerical field being evaluated.

Queries icon

count, count_distinct, count_frequent

Use with a group operator and field name.

Queries icon

first, last

Return the first or last result relative to the sort order.

Queries icon

median

Calculates the median value for a particular field.

Queries icon

min, max

Use these functions to find the smallest or largest value in a set of values.

Queries icon

most_recent, least_recent

Select the most or least recent value within a group.

Queries icon

pct

Finds the specified percentiles of a given field.

Queries icon

pct_sampling

Finds the percentile of a given field.

Queries icon

stddev

Finds the standard deviation for numerical values within a time range.

Queries icon

sum

Adds values of a numerical field being evaluated within a time range.

Queries icon

values

Provides all the distinct values of a field.