How are queries affected when a trigger alters an app input

Hi! I’m learning about Tulip and figuring out some intended design patterns. One thing I’m trying to figure out is how to access table records when we might not know the ID of the row we want to load. It seems to me like using a Table Query + Aggregation is the right way to go about things. In one of the apps I’m building I have a loop that changes the app input to the query. How does the query get placed in the execution queue? Does this create a race condition? Appreciate any help