InfluxDB:cannot use field in group by clause
最近在使用InfluxDB时,发现一个很奇怪的问题,一个本来正常的功能,做了一次改动后,就不能正常显示了.
一、查询语句
SELECT MEMORY FROM "ACM_PROCESS_MONITOR" GROUP BY USER_NAME
异常信息如下:
Server returned error: can not use field in GROUP BY clause: USER_NAME
Group By语句后面,只能是Tag列,不能是Field列
二、查看所有Tag列

说明USER_NAME是Tag列
三、查看所有Field列

说明USER_NAME是Field列
综上所述,USER_NAME既是FIELD列,又是TAG列!
四、问题产生原因
产生这个问题的原因,是因为UESER_NAME以前确实是FIELD列:

因为不能在GROUP BY 中查询,于是把它设置为了TAG列:

为了方便,删除了原来的表,数据都是新的,GROUP BY 没有问题。
今天一不小心,又启用了改之前的程序,导致又把USER_NAME作为了FIELD列,所以GROUP BY的时候出问题了。
老外的描述:https://github.com/influxdata/influxdb/issues/3783
解决方案:
1.把表删了重建,然后启用新程序
或:
2.重新为USER_NAME取一个作为TAG列的名字:TAG_USER_NAME,数据都写到这里,用它作为GROUP BY的Tag列
InfluxDB:cannot use field in group by clause的更多相关文章
- SELECT list is not in GROUP BY clause and contains nonaggregated column
报错如下: Expression # of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘sss.m ...
- MYSQL报错:1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column
1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'rpa ...
- [mysql] Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'loser.tank_admin.login_ip' which is not functionally dependent on columns in GROUP BY clause; this is
执行SQL: SELECT login_name,login_ip,sex FROM tank_admin GROUP BY login_name ; 时抛出异常. Expression #2 of ...
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause 的问题 MySQL
问题:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregate ...
- Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column
安装了mysql5.7.19后,执行语句中只要含有group by 就会报这个错 [Err] 1055 - Expression #1 of ORDER BY clause is not in GRO ...
- Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'userinfo.
安装了mysql5.7,用group by 查询时抛出如下异常: Expression # of SELECT list is not in GROUP BY clause and contains ...
- 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contai
之前一直使用的mysql5,突然换成8之后,有许多地方不一样,今天就碰到一个. 在使用sql语句创建表时,报错: 1055 - Expression #1 of ORDER BY clause is ...
- MYSQL---Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column '
--数据库中插入数据或执行sql语句时一直报下面这个错误: Expression # of ORDER BY clause is not in GROUP BY clause and contains ...
- mysql问题解决SELECT list is not in GROUP BY clause and contains nonaggregated column
今天在Ubuntu下的部署项目,发现一些好好的列表页面发生 :Expression # of SELECT list is not in GROUP BY clause and contains no ...
随机推荐
- tcprstat
tcprstat http://www.percona.com/docs/wiki/tcprstat:start 监控网络流量情况,计算请求的响应时间(the delay between reques ...
- CSharpGL(47)你好,Framebuffer!
CSharpGL(47)你好,Framebuffer! Framebuffer对象(FBO)是一种复杂的OpenGL对象.使用自定义的framebuffer,可以实现离屏渲染,进而实现很多高级功能,例 ...
- SSM框架通过mybatis-generator自动生成代码
一.首先eclipse配置好maven环境,并且创建好一个SSM框架的工程 二.在pom.xml中添加plugin <build> <finalName>ssm_web< ...
- POJ1082食物链
加权并查集入门习题. 传送门http://poj.org/problem?id=1182 下面来记录一下做法: 并查集的作用是询问两个对象时候在同一集合以及将两个非空不相交集合合并. 本题涉及两点之间 ...
- linux使用yum安装mariadb
一,安装 yum install mariadb mariadb-server 二,如何设置密码 用root 进入mysql后 mysql>set password =password('你的 ...
- 源码剖析Django REST framework的请求生命周期
学习Django的时候知道,在Django请求的生命周期中,请求经过WSGI和中间件到达路由,不管是FBV还是CBV都会先执行View视图函数中的dispatch方法 REST framework是基 ...
- 智能合约开发环境搭建及Hello World合约
如果你对于以太坊智能合约开发还没有概念(本文会假设你已经知道这些概念),建议先阅读入门篇. 就先学习任何编程语言一样,入门的第一个程序都是Hello World.今天我们来一步一步从搭建以太坊智能合约 ...
- angular2.x指令
1.指令 *ngIf: 判断 isActive 为true时 <user-detail> 生效展示 <user-detail *ngIf="isActive"&g ...
- jquery.form.js+jquery.validation.js实现表单校验和提交
一.jquery引用 主要用到3个js: jquery.js jquery.form.js jquery.validation.js 另外,为了校验结果提示本地化,还需要引入jquery.vali ...
- NETStandard,NETFx,Mono,NETCore,ASPNetCore 之间关系的整理
因为现在很多人对这几者之间的关系还不甚了解,这里根据我所知来做一个大概的介绍...... .NET Standard: .NET标准,只要符合这个标准实现类库,即可在支持此标准的Run ...