ES-SQL UNION alternative [Was: Sql query canvas]

Hello,,

I need to implement this query in the canvas but it is not working. is there another way to get the same result?

  • SELECT SUM(amount) **
    *FROM (SELECT AMOUNT as amount FROM "payment-index "*
  • UNION **
    *SELECT PaindAmount as amount FROM "ssk-index ")*

thanks,

Hi, could you provide a bit more info into what's not working exactly and how does your data look like?

1 Like

I have two different indices with two different fields, i want to add them together and view it in the dashboard, i tried to it by dashboard but it is not possible.. now i am trying to use canvas to make this

And what is the error that you're getting with the current query?

image

this is what i get when i run the query

I think UNION is not supported by the ES SQL, according to the docs here.

1 Like

what can i use instead of union?

I will transfer this question to ES forum, as they might be able to help further. In the meantime, this is an issue to help you track support for UNION.

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