在探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');

[elk]bin/elasticsearch-sql-cli使用

分类聚合的作用

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
[elk]bin/elasticsearch-sql-cli使用

  • 支持函數: age 求和
    [elk]bin/elasticsearch-sql-cli使用

  • select查询
    [elk]bin/elasticsearch-sql-cli使用

  • 查看列
    [elk]bin/elasticsearch-sql-cli使用

  • 支持的函數
    [elk]bin/elasticsearch-sql-cli使用

相关文章:

  • 2022-12-23
  • 2021-08-21
  • 2022-02-05
  • 2022-02-18
  • 2022-12-23
  • 2021-05-01
  • 2021-06-07
猜你喜欢
  • 2022-12-23
  • 2021-09-05
  • 2021-11-25
  • 2021-10-28
  • 2021-08-03
  • 2021-08-08
  • 2021-09-16
相关资源
相似解决方案