Need help on a query to sum all values by month grouped by comma
Trying:
SELECT GROUP_CONCAT( (
SELECT SUM( price )
FROM sales
GROUP BY MONTH( date ) )
)
FROM sales
LIMIT 0 , 30
but returning: #1242 - Subquery returns more than 1 row
group_concat alone won't help cause I need the sum of the values by month.
Any help? Thanks