Group by month and year in MySQL
GROUP BY YEAR(t.summaryDateTime), MONTH(t.summaryDateTime);
is what you want.
GROUP BY DATE_FORMAT(summaryDateTime,'%Y-%m')
GROUP BY YEAR(t.summaryDateTime), MONTH(t.summaryDateTime);
is what you want.
GROUP BY DATE_FORMAT(summaryDateTime,'%Y-%m')