I would like to be able to delect a number of fields from a mysql database and then sub total each column
I'm currently using something like
select
quantity,
price,
shipping charge
from
sales
group by
date_time
;
I would like to sub total the select items each time the group by item changes.
Can someone please tell me what I need to add to get sub totals or even just totals to work.
I have experimented with sum() but this seems to show up as another column and the results look a bit odd.
Thanks
Paul
I'm currently using something like
select
quantity,
price,
shipping charge
from
sales
group by
date_time
;
I would like to sub total the select items each time the group by item changes.
Can someone please tell me what I need to add to get sub totals or even just totals to work.
I have experimented with sum() but this seems to show up as another column and the results look a bit odd.
Thanks
Paul