Skip to main content Skip to complementary content

COUNT_EACH

Counts the number of items for each given group.

Syntax

COUNT_EACH([MAX_VALUES,] GROUP)

Arguments

MAX_VALUES

Type: integer

Default: 2,147,483,647

(Optional) The maximum number of entries that are counted. When omitted, there is effectively no limit.

GROUP

Type: any

The field to be counted.

Returns

Type: array

Returns an array of key-value pairs where each GROUP is matched to the number of values VALUE seen for that group.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!