I have a table from which I generate a view Grouping By Year and summing the amounts, and I wonder if I could somehow include a "string sum" or "string concatenation" of the aggregated dates or months.
Example: this is the base table
ID | date | year | month | amount
This is the actual view
ID | year | sum(amount)
what I am looking for is an additional field with concatenates the months to 03,05,11 (for example or to something similar), if a year aggregates data from march, may and november
ID | year | sum(amount) | list_of_months
Is that possible or do I have to create helping views to aggregate that?
Edit: I was able to answer myself: Group_concat to the help as shown in the answer below
show create table tableName
and add the output on the question in text format. Add some data examples and expected result