How to write SQL clause were group of columns is in array of values

I want create a SQL query like this:
select * from table where (table.id,table.state) in (values (80,'stateA'),(13,'stateB'))
But I don’t know how to group the columns to call the in_ method.

Thanks in advance.

Well Array is not standard SQL so python-sql does not implement them.

1 Like

Thank you very much for the answer Cedric, I solved it in the following way in case someone else needs it:

where=(
                ((table.id).in_(list_idsA) & (table.state == 'stateA'))
                | ((table.id).in_(list_idsB) & (table.state == 'stateB'))
                | ((table.id).in_(list_idsC) & (table.state == 'stateC'))
                )))