将SQL查询转换为Elastic搜索

时间:2019-12-11 22:07:44

标签: elasticsearch

我需要将此SQL查询转换为Elastic搜索

select f.name, f.major as mxmajor, f.minor as miminor
from (
   select name, description, max(major) as maxmajor, max(minor) as maxminor
   from data group by name,major
) as x inner join data as f on f.name = x.name and f.major=x.maxmajor and f.minor=x.maxminor

0 个答案:

没有答案