Even though the sample Raymark posted can help you, it's not a good approach in terms of best practices - hard to understand, to much code to get a dataset.
Aggregates do not have the IN operator and this is already an Idea with a lot of votes, please check this to help the idea get stronger: https://www.outsystems.com/ideas/2224/in-clause-in-aggregates
Sometimes the IN operator is not the best solution (has limitations and can be a bottleneck performance-wise). Depending on what you want to achieve, using a JOIN or filter the results afterwards can be a simpler and better solution.
Be mindful of what you want to achieve before jumping to a solution :)