stats() Query Function

Used to compute multiple aggregate functions over the input. ... | stats(function=[min(), max()])—equivalent to just [min(), max()]. It produces one row of data that contains both min and max results.

Parameters

Name

Type

Required

Default

Description

function

[Aggregate]

No

count(as=_count)

Specifies which aggregate functions to perform on each group. Default is to count(as=_count) the elements.

The implied parameter is function.

Examples

This is equivalent to just count():

humio
stats(function=count())

Find the maximum and minimum:

humio
[min_response := min(responsetime), max_response := max(responsetime)]