Let\'s say I have a table \'shares\' with the following columns:
company price quantity Microsoft 100 10 Google 99 5 Google 99
You actually want the label method.
result = dbsession.query(Shares.price, \ func.sum(Shares.quantity).label("Total sold")) \ .filter(Shares.company== 'Google') \ .group_by(Shares.price).all()