Being able to have both `and` and `or` in table filters

Hello, we would like to be able to apply both and and or conditions at the same time in Table filters:

For example, in a table with these values:

  { "name": "Hanson Deck", "role": "Manager", "salary": 120 }, 
  { "name": "Sue Shei", "role": "Worker", "salary": 110 }, 
  { "name": "Jason Response", "role": "Worker", "salary": 70 }, 
  { "name": "Cher Actor", "role": "Manager", "salary": 120 }, 
  { "name": "Erica Widget", "role": "CEO", "salary": 200 }

We would like the user to be able to create this filter rule:
employees where salary > 100 and (role = "CEO" or role = "Manager")

Unfortunatelly, this is currently not possible because only ands or ors can be applied at the same time:

I guess the reason is because the precedence of multiple ands and ors cannot be defined.

For our use case, here are two potential solutions:

  • (generic) Be able to define the precedence of the conditions like A and (B or C) vs (A and B) or C
  • (specific) Add the IN condition for filtering values contained in a list of values

What do you think would be the best ?