Files
doc-exports/docs/dli/umn/dli_03_0069.html
Su, Xiaomeng 3a07c40729 dli_umn_20250212
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
2025-02-24 08:11:08 +00:00

1.1 KiB

How Can I Use the count Function to Perform Aggregation?

The correct method for using the count function to perform aggregation is as follows:

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

Or

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

If an incorrect method is used, an error will be reported.

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