* | SELECT 列名, 聚合函数 GROUP BY [ 列名 | 别名 | 序号 ]
* | SELECT status, request_time, COUNT(*) AS PV GROUP BY status
为非法分析语句,因为 request_time 不是 GROUP BY 的列。参数 | 说明 |
列名 | 日志字段名称或聚合函数计算结果列,支持单列或多列 |
别名 | 按照日志字段或聚合函数计算结果的别名进行分组 |
序号 | 某列在 SELECT 语句中的序号(从1开始)。 例如 status 列的序号为1,所以下面两个语句为等同关系。 * | SELECT status, count(*) AS PV GROUP BY status * | SELECT status, count(*) AS PV GROUP BY 1 |
聚合函数 |
* | SELECT status, count(*) AS pv GROUP BY status
* |SELECTdate_trunc('minute',cast(__TIMESTAMP__ as timestamp)) AS dt,count(*) AS pvGROUP BYdtORDER BYdtlimit10
* |SELECThistogram(cast(__TIMESTAMP__ as timestamp),interval 5 minute) as dt,count(*) as pv,count(distinct(remote_addr)) as uvgroup bydtorder bydt
本页内容是否解决了您的问题?