在探sql groupby语句
这个长久不用竟然忘记
part name age
dep1 ara 22
dep1 arb 22
dep1 arc 22
dep2 ema 10
dep2 emc 11
dep2 emd 12
insert into employee values('part1','ara');
insert into employee values('part1','arb');
insert into employee values('part1','arc');
insert into employee values('part2','ema');
insert into employee values('part2','emb');
insert into employee values('part2','emc');
分类聚合的作用
es6.3的bin/elasticsearch-sql-cli命令elastic
- 不支持insert
- 不支持groupby
我给es插入3条数据(用kibana)
POST app01/user/1
{
"name":"bob",
"gender":"male",
"age":17
}
POST app01/user/2
{
"name":"cristin",
"gender":"femail",
"age":19
}
POST app01/user/3
{
"name":"emy",
"gender":"female",
"age":20
}
https://www.cnblogs.com/iiiiher/p/7820998.html
文檔: https://www.elastic.co/guide/en/elasticsearch/reference/6.x/sql-spec.html
-
支持函數: age 求和
-
select查询
-
查看列
-
支持的函數