Skip to main content
Version: 3.4

QueryAggregateExpression 查询聚合函数

1. 结构声明

class QueryAggregateExpression extends LogicItem {
asName: string;
aggregateName: 'COUNT' | 'COUNTD' | 'SUM' | 'AVG' | 'MAX' | 'MIN';
aggregateParam: QueryFieldExpression;
}

2. 节点示例

(1) 示例

AST 如下:

{
"concept": "QueryAggregateExpression",
"aggregateName": "SUM",
"aggregateParam": {
"concept": "QueryFieldExpression",
"isDotStar": false,
"entityAsName": "OrderProduct",
"propertyName": "amount",
"asName": ""
},
"asName": "totalAmount"
}