Using sqlalchemy to query using multiple column where in clause
- by crunkchitis
I'm looking 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 only want kids that like (lavender AND lentil soup) OR (black and carrot juice).
This is similar, but doesn't get me all of the way there:
Sqlalchemy in clause