statsby

Type of operation: Aggregate

Description

Calculate statistics of columns with aggregate functions, based on (optional) grouping columns.

If you want a accelerable version, consider timestats or timechart.

If groupby is not specified, the default grouping will be used. The default grouping for statsby is the set of primary key columns.

Usage

statsby [ groupby_1, groupby_2, ... ], groupOrAggregateFunction_1, groupOrAggregateFunction_2, ...

Argument

Type

Optional

Repeatable

Restrictions

groupby

storable

yes

yes

column

groupOrAggregateFunction

expression

no

yes

none

Accelerable

statsby is never accelerable. A dataset that only uses accelerable verbs can be accelerated, making queries on the dataset respond faster.

Examples

statsby Count:count(1), group_by(server_name)

Group input data by server name, calculating a count of rows per server name, returning a dataset with the two columns server_name and Count.