Hey Adam! You should definitely be able to use values from a SQL query in another SQL query.
I wonder if something like additionalScope
would help. That would allow you to trigger a query and pass in the result of another query.
Here's a guide on how additionalScope
works:
https://community.retool.com/t/how-to-use-additional-scope-additionalscope-in-your-queries/13343
Here's an example of a user who may have a similar use case to yours: