Use SQLAlchemy instead of raw SQL