You'll find the function in the "Functions & Operators" manual, but it's not really "well documented".
Those functions only work for PERIODs and need a WITH to provide the source data, which is then passed to the table function.
The grouping column(s) are passed in the NEW VARIANT_TYPE and must be listed as first column(s) in RETURNS.
The PERIOD is the 2nd parameter for input and ouput and there's an optional count column returning the number of rows combined into one.
HASH BY must be the grouping column(s) and order by must be the grouping column(s) plus the period.
When you miss any part of that syntax you'll get a nice error message :-)
You'll find the function in the "Functions & Operators" manual, but it's not really "well documented".
Those functions only work for PERIODs and need a WITH to provide the source data, which is then passed to the table function.
The grouping column(s) are passed in the NEW VARIANT_TYPE and must be listed as first column(s) in RETURNS.
The PERIOD is the 2nd parameter for input and ouput and there's an optional count column returning the number of rows combined into one.
HASH BY must be the grouping column(s) and order by must be the grouping column(s) plus the period.
When you miss any part of that syntax you'll get a nice error message :-)
Dieter