Groups items together in an aggregation.
The group()
function refines a WixDataAggregate
so that its items are
grouped by the specified property or properties.
You can perform aggregations on the groups using the following functions:
To filter grouped results, use the having()
function.
Notes:
group()
function once per aggregate query.function group(propertyName: Array<string>): WixDataAggregate;
The property or properties to group on.
let newAggregate = aggregate.group("state");
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.