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

function is the unnamed parameter.

Examples

This is equivalent to just count()

stats(function=count())

find the maximum and minimum

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