I want to execute this query using sqlalchemy.
SELECT name, age, favorite_color, favorite_food FROM kindergarten_classroom WHERE (favorite_color, favorite_food) IN (('lavender','lentil soup'),('black','carrot juice'));
I want only children who like (lavender and lentil soup) OR (black and carrot juice). Also, it will probably be a huge list of favorite colors and products (probably> 10K), so I want to do this in large batches.
This is similar, but not everything works out for me: Sqlalchemy in the section
source share