Quick question, I have the following table
+-------------+---------------------+ | total | o_date | +-------------+---------------------+
SELECT year(FROM_UNIXTIME(created)) year, month(FROM_UNIXTIME(created)) month, sum(amount) total FROM {my_table} GROUP BY year, month ORDER BY year, month;