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()
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()