How to multiply two columns and then sum the result in ElasticSQL?

Hi I would like to subtrac one value to one column, then multiply two columns, and finally sum the result:

SELECT SUM(column_a*(column_b-1)) AS result FROM table_1 WHERE column_c='G' AND column_d='H' AND column_b>1.00

but in ElasticSQL from Elasticsearch i'm getting this error:

{
  "error": {
    "root_cause": [
      {
        "type": "sql_illegal_argument_exception",
        "reason": "Does not know how to convert argument Mul[] for function Sum[]"
      }
    ],
    "type": "sql_illegal_argument_exception",
    "reason": "Does not know how to convert argument Mul[] for function Sum[]"
  },
  "status": 500
}

Any idea to solve it?

@Miguel_Plazas thank you for trying out ES-SQL and for reporting things that you would like to use with it. The functionality you are looking for is not possible at the moment in ES-SQL. But, there is an enhancement request already created here.

Thanks Andrei! I understand!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.