Can we use SQL Join in elastic query?

Hi Sejal,
you are going way out of original question.

  1. currently you can't join two indice to get a result using elastic sql.

to solve that everyone said denormalize the data. that means combine two indice to create new indice because your have common field called username

for that you have to pull the data from it's source combining it.

Then I assume you have SQL server where these data are residing. But looks like I am wrong there.

So ignore all that what I said about jdbc.

here is what you have to do in nut-shell

read index1
read index2

filter {
if index1.username = index2.username ; merge data.
}

I do not know how to achieve that. some testing needed.

https://discuss.elastic.co/t/merging-two-indexes-by-a-common-field/96576/6