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, ...)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"}\n{"c1":1,"c2":"1"}\n{"c1":2,"c2":"2"}\n