from sqlalchemy import delete, and_ from s1_models import * d = delete(cookies).where(and_(cookies.c.cookie_name.like('%raisin%'), cookies.c.quantity > 500)) result = connection.execute(d) print(result.rowcount)