Hi, I have a sql query which has subquery, can any one help me how this could be done in Elastic search 5 and above.
> select sum(a.netamt) , > (select sum(total_amount) > from ( > select distinct number, total_amount > from Table1 > where id=6 > ) a > ) total_amount > from Table1 a > where a.id=6
Suppose my sql Table1 looks like this.
|number||net amt||total amount|
Here, In my ES query iam trying to avoid terms & cardinality because both have limitations when it comes to large dataset.Kindly let me know the best way to implement it. Thanks in advance.