0

I have data similar to follwing example in OpenSearch

version message
1        message_1
2        message_1
2        message_2

I would like to search for messages that are exclusively on version two only. How do I do it? I tried with workbeach SQL but it seems it does not support subquery.

I need something similar to this version:2 exclude all messages that in version 2

The expected result from the example would be version message 2 message_2

I tried to run SQL query with subquery like

select message from index-* where version=2 and message not in (select message from index-* where version = 1)

But it I found that Opensearch can not run SQL subquery

0 Answers0