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

时间:2024-11-06 21:53:29

count函数如何进行聚合

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

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

或者

SELECT
  http_method
FROM
  apigateway
WHERE
  service_id = 'ecs' DISTRIBUTE BY http_method

错误用法:将会报错。

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