Mysql pivote table n8n


I have a rather Mysql based question but I would need n8n to do it :slight_smile:
I get a table of “tags” which will change from time to time or there will be new ones, and others to delete (screenshot)
Capture d’écran 2022-09-10 211352
and I would like to make a table then with these data, I show you a drawing of this I would like to do, and current data that I have.

Capture d’écran 2022-09-10 211654
and the third screenshot, is how I would like to see the data displayed!

Capture d’écran 2022-09-10 211654 end

To put it simply, the array of tags I would like it to become the fields of the database and that when a customer has a tag there is an X where he has the tag or tags. but the problem is mainly the tags that can be added or deleted

Thank you !

Hi @Larmier_Anthony, I assume you have already figured out your SQL query? Are you running into any troubles when executing your query using the MySQL node in n8n? Which error exactly are you seeing?