if the result from one aggregate is used in filter condition of another aggregate, is there any performance concern? any way to make the query more efficient
I don't think this is possible. If you got it to work, and it is working as expected, I would say roll with it. When I was in Outsystems' associate developer boot camp the instructor said that this shouldn't be possible and this is an example of when you should use the SQL element.
thanks for the info
The way you implemented the filter should work OK. Regarding the performance, you must first fetch the "Param11" and then use the result to fetch the data with the filter. I'm not sure if there could be relevant performance improvements if you did that in a single SQL query because you would still have to fetch the filter and the final data in sequence.