数据湖探索 DLI-count函数如何进行聚合

时间:2025-02-12 15:00:38

count函数如何进行聚合

使用count函数进行聚合的正确用法如下:

SELECT  http_method,  count(http_method)FROM  apigatewayWHERE  service_id = 'ecs' Group BY http_method

或者

SELECT  http_methodFROM  apigatewayWHERE  service_id = 'ecs' DISTRIBUTE BY http_method

错误用法:将会报错。

SELECT  http_method,  count(http_method)FROM  apigatewayWHERE  service_id = 'ecs' DISTRIBUTE BY http_method
support.huaweicloud.com/dli_faq/dli_03_0069.html