MySQL - Add Values In Query And Return As Single Value
- by Sjwdavies
I'm trying to query a database, and return a set of values. Part of the data i'm trying to return is an insurance premium breakdown.
Is it possible to run a query, that selects multiple fields, then adds then and returns them as a single value?
I've seen SUM() but the examples i've seen show it as adding up the results of an entire field - where as i need it to add specific fields for each row returned.
Any help is much appreciated.