Merge parts of mysql query result

just start to work with my n8n and mysql query module.

in my database are some lines with the same “manufacturs” but different brands.

first i make a select * on the database with a LIMIT 1
I get one line and the next query is select * where manufactor = (name of)

in this case I get 6 Items. with the same manufacture and different bands.

next mysql, I want insert one row, where the 6 bands comma seperated in one field.

ok, I can manualy put every item in the field but sometimes I have 1 Item, sometimes 3 or 6 or 210 items.

can someone tell me how I can merge the items into one field?

thanx

You can use the aggregate node with All Item Data (Into a Single List) to have a single item.
To create a comma separated list you can simple use an expression e.g. {{ $json.data.map((i) => i.brand).join(',') }} (the Edit node in the example workflow)

Super, that works fine.

thank you Franz!