Processing multiple items from a SQL query


I have a SQL window query that groups data from a table based on the result of another SQL query.

I would like to run the second (window) query for each of the rows in the first query, however the MySQL node returns rows for the first item in the initial query’s rows.

Basically the logic would be: get rows from first query → run second query for each row (with using an expression for WHERE filtering) → output the data from second query to a custom node

Is there any forEach type of functionality that could be leveraged to implement this? Unfortunately rewriting the SQL query to group the data would be a major pain in the ass so I’m trying to avoid it. I also have tried the FunctionItem node but it doesn’t fit my needs as it can’t be used to run other nodes on demand from what I’ve understood.

Any input would be appreciated, thanks!

Did you check the split batches node?

That’s exactly what I needed to run each query individually. Thank you so much! :bowing_man:

Of course. Glad that it worked.