Elastic SQL - exclude documents based on nested objects

Hi,
I need to filter out documents that meet a condition in one of its nested objects. For example, if there is at least one nested object that has a code of 708 the document should not match. However, when I specify "AND nested.code <> 708", as long as there is one nested object without code 708 the document will be matched.
In JSON search this will be in the must_not query (filtering out documents which contain nested objects with code 708)
In RDBMS this would be accomplished with a sub query or outer apply.
Is there a way to do this in ES SQL ?

Thanks

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