Quick question, I have the following table
+-------------+---------------------+ | total | o_date | +-------------+---------------------+
select year(o_date), month(o_date), sum(total) from table group by year(o_date), month(o_date);