SQL Query with "NOT IN" keyword replacement in ES

It doesn't matter its SQL or elastic search query. I need a solution for this logic:
ES Logic