更新时间:2022-09-29 GMT+08:00
分享

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
分享:

作业开发 所有常见问题

more