Saya akan mengikuti yang berikut
SELECT SUM(totalprice), year(date), month(date)
FROM sales
GROUP BY year(date), month(date)
Saya akan mengikuti yang berikut
SELECT SUM(totalprice), year(date), month(date)
FROM sales
GROUP BY year(date), month(date)