QueryComputedAggregate
@gravity-rail/sdk / QueryComputedAggregate
Interface: QueryComputedAggregate
A named per-member aggregate (member queries only). The fields of
QueryAggregatePredicate that say what is aggregated, validated by the
same rules, plus an alias that sort and select reference as
computed.<alias>. A member with no rows reads 0 for count/sum and null
for max, which sorts last in either direction.
Properties
alias
alias:
string
metric?
optionalmetric:"count"|"max"|"sum"
of?
optionalof:string|null
sum only: the numeric record field to total (record.<slug>).
period?
optionalperiod:QueryAggregatePeriod|null
sum only: the calendar month the records must fall in.
periodField?
optionalperiodField:string|null
sum only: the record date field the calendar month is read from.
source
source:
string
sourceIds?
optionalsourceIds:number[] |null
windowDays?
optionalwindowDays:number|null
windowHours?
optionalwindowHours:number|null
Mutually exclusive with windowDays.