Quick question, I have the following table
+-------------+---------------------+ | total | o_date | +-------------+---------------------+
Get Month And Year wise data from MySQL database:
SELECT MONTHNAME(o_date), YEAR(o_date), SUM(total) FROM the_table GROUP BY YEAR(date), MONTH(date)