groupFormat
Formats the rows in each group using the specified output format and returns the result as a string.
Formats the rows in each group using the specified output format and returns the result as a string.
The format name is passed as a parameter, and the arguments are the columns to format. Column names are generated as c1, c2, ... in the formatted output.
Syntax
groupFormat(format)(x, y, ...)Parameters
format— Output format name. For example, JSONEachRow, CSV, TabSeparated.String
Arguments
x, y, ...— Expressions to format as rows.Any
Returned value
Formatted output for the group. String
Examples
Basic usage
SELECT groupFormat('JSONEachRow')(number, toString(number))
FROM numbers(3){"c1":0,"c2":"0"}
{"c1":1,"c2":"1"}
{"c1":2,"c2":"2"}groupConcat
Calculates a concatenated string from a group of strings, optionally separated by a delimiter, and optionally limited by a maximum number of elements.
groupNumericIndexedVector
Aggregates (index, value) pairs into a numeric indexed vector (a sparse vector addressed by an integer index) and supports pointwise operations between such vectors.