sqlalchemy average