Page 1 of 1

[SOLVED] Quick Answer? Sum total column in table

Posted: Fri Feb 17, 2006 2:44 am
by michlcamp
I have a table called 'orders' with a column/field for $total

Is there a fast way to: sum($total) by month? (so as to give total sales per month)

Thanks in advance.

mc

Posted: Fri Feb 17, 2006 3:38 am
by khaki_monster
hi!

i supposed that theirz a field for 'month'... :)

Code: Select all

$tot_sales_permonth = "Select SUM('total_fld') From order GROUP BY month_fld";
cheerz!

Posted: Fri Feb 17, 2006 4:22 am
by michlcamp
thanks.
Solved.