开发者社区 问答 正文

日志查询分析报错Column ‘xxxxline‘ not in GROUP BY clause;p

日志查询分析报错Column ‘xxxxline‘ not in GROUP BY clause;please add the column in the index attribute,如何解决?

展开
收起
保持可爱mmm 2020-03-26 23:20:41 740 分享 版权
1 条回答
写回答
取消 提交回答
  • 报错原因 您在查询中使用了GROUP BY语法,但是在Select中引用了一个非agg字段,该字段没有出现在GROUP BY中。例如select key1, avg(latency) group by key2 ,key1没有出现在GROUP BY中。 解决方案 正确语法是select key1,avg(latency) group by key1,key2。

    2020-03-26 23:20:52
    赞同 展开评论