I'm trying to group the data into a table so that I can group the DATE column into a month + year and at the same time differentiate the segment.
In MySQL something like:
SELECT CONCAT(YEAR(Date), '-',MONTH(Date)) AS MonthYear, Segment, SUM(Price) FROM table GROUP BY CONCAT(YEAR(Date), '-',MONTH(Date)), Segment
From this I then need to create a stacked graph. I was looking for various tutorials but to no avail.