MySQL Monthly SUM totals
Posted on 2003-03-22
I would like to SUM a column (ordertot) from a table (select2) by month (date). The format of the date column is yyyy mm dd (ie. 2003-03-22)
So far I can display every entry, but I would like to group them by month.
I have used thus far:
select SUM(ordertot) from select2 GROUP BY Date,'yyyy mm dd'
I am unable to get the totals in a monthly format. Everything I try gives me a MySQL error.
Any help would be greatly appreciated.