[MYSQL] Select multiple items and delete them in bulk

i'm a newbie and i'm testing the platform, specially with Mysql.
I've created a table to read a DB table, and i've added the option to choose multiple items.

After that i've added a button that should remove all items that were selected from DB.

Unfortunately when i try to set the query the system doesnt recognize this syntax:

Instead it seems like i can pass only a fixed value, as in this way a can remove a single item {{productsTable.selectedRow.data['0'].gtin}}

In this way i cannot delete items in bulk. Probably i'm doing a mistake.

Thanks so much

Hey @retoolprovaferrarsboutique :wave: In a JS query you can loop through the selected rows array and trigger a delete query for each item similar to this example in our docs: https://docs.retool.com/docs/scripting-retool#4-write-the-javascript-query

Would this work for your use case?